fontforge脚本函数

上传人:bao****ty 文档编号:149798781 上传时间:2020-10-30 格式:DOC 页数:50 大小:357KB
返回 下载 相关 举报
fontforge脚本函数_第1页
第1页 / 共50页
fontforge脚本函数_第2页
第2页 / 共50页
fontforge脚本函数_第3页
第3页 / 共50页
fontforge脚本函数_第4页
第4页 / 共50页
fontforge脚本函数_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《fontforge脚本函数》由会员分享,可在线阅读,更多相关《fontforge脚本函数(50页珍藏版)》请在金锄头文库上搜索。

1、Scripting functions-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-The built in procedures are very similar to the menu items with the same names. Often the description here is sketchy, look at the menu item for more information.I use a syntax like:Generate(filename,bitmaptype,fmflags,res,mult-

2、sfd-file,namelist-name)To mean that arguments after the first are optional. However if you wish to set the fourth argument you must specify the second and third arguments too.AAddAccent(accent,pos)There must be exactly one glyph selected. That glyph must contain at least one reference (and the least

3、 recently added reference must be the base glyph - the letter on which the accent is placed). The first argument should be either the glyph-name of an accent, or the unicode code point of that accent (and it should be in the font). The second argument, if present indicates how the accent should be p

4、ositioned. if omitted a default position will be chosen from the unicode value for the accent, this argument is the or of the following flags:0x100Above0x200Below0x400Overstrike0x800Left0x1000Right0x4000Center Left0x8000Center Right0x10000Centered Outside0x20000Outside0x40000Left Edge0x80000Right Ed

5、ge0x100000TouchingAddAnchorClass(name,type,lookup-subtable-name)AddAnchorClass(name,type,script-lang,tag,flags,merge-with)These mirror the values of the Anchor class dialog of Element-Font Info. The first argument should be a utf8 encoded name for the anchor class. The second should be one of the st

6、rings default, mk-mk, or cursive. The third should be a lookup subtable name.AddAnchorPoint(name,type,x,y,lig-index)Adds an AnchorPoint to the currently selected glyph. The first argument is the name of the AnchorClass. The second should be one of the strings: mark, basechar (or base), baselig (or l

7、igature), basemark, cursentry (or entry) , cursexit (or exit) or default (default tries to guess an appropriate setting for you). The next two values specify the location of the point. The final argument is only present for things of type baselig.AddATT(type,script-lang,tag,flags,variant)AddATT(Posi

8、tion,script-lang,tag,flags,xoff,yoff,h_adv_off,v_adv_off)AddATT(Pair,script-lang,tag,flags,name,xoff,yoff,h_adv_off,v_adv_off,xoff2,yoff2,h_adv_off2,v_adv_off2)SeeAddPosSubAddDHint(x1,y1,x2,y2,unit.x,unit.y)Adds a diagonal hint. A diagonal hint requires two points on oposite sides of the stem and a

9、unit vector in the direction of the stem.AddExtrema()If a spline in a glyph reaches a maximum or minimum x or y value within a spline then break the spline so that there will be a point at all significant extrema. (If this point is too close to an end-point then the end-point itself may be moved. Th

10、ere are various other caveats. See Element-AddExtremafor more information).AddHHint(start,width)Adds horizontal stem hint to any selected glyphs. The hint starts at location start and is width wide. A hint will be added to all selected glyphs.AddInstrs(thingamy,replace,instrs)Where thingamy is a str

11、ing, either fpgm or prep in which case it refers to that truetype table (which will be created if need be), or a glyph-name in which case it refers to that glyph, or a null string in which case any selected characters will be used.Where replace is an integer. If zero then the instructions will be ap

12、pended to any already present. If non-zero then the instructions will replace those already present.And instrs is a string containing fontforges human readable version of tt instructions, as IUPxnIUPyAddLookup(name,type,flags,features-script-lang-array,after-lookup-name)Creates a new lookup with the

13、 given name, type and flags. It will tag it with any indicated features. The type of one of gsub_single gsub_multiple gsub_alternate gsub_ligature gsub_context gsub_contextchain gsub_revesechain morx_indic morx_context morx_insert gpos_single gpos_pair gpos_cursive gpos_mark2base gpos_mark2ligature

14、gpos_mark2mark gpos_context gpos_contextchain kern_statemachineA feature-script-lang array is an array with one entry for each feature (there may be no entries if there are no features). Each entry is itself a two element array, the first entry is a string containing a 4 letter feature tag, and the

15、second entry is another array (potentially empty) with an entry for each script for which the feature is active. Each entry here is itself a two element array. The first element is a 4 letter script tag and the second is an array of languages. Each entry in the language array is a four letter language. Example: liga,latn,dfltThe optional final argument allows you to specify the ordering of the lookup. If not specified the lookup will be come the first lookup in its table.AddLookupSubt

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 教学课件 > 高中课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号