Using Opentype Features in Libreofiie
Total Page:16
File Type:pdf, Size:1020Kb
Using OpenType Features in LibreOfiie David J. Perry Ver. 1.2 updated August 4, 2017 Note: Part I provides background for those who have litle or no experience using OpenType. If you are already familiar with OpenType features and just want to learn how to access the in Libre# O$ce% you can go directly to Part II. tou might also need to read Part Ii if you have worked with OT features through a graphical interface rather than by using four-character codes. N.B.: names o keys on the key#oard are s"o$n in smal% capitals (enter, tab, etc.(. I. About OpenType A. Introduction )penType (ab#reviated O* herea+er( is a font te&"no%ogy t"at enab%es t"e appearance o &"aracters to be c"anged without altering the under%ying te,t. W"y wou%d one want su&" a thing? /n some languages, c"aracters may need to be res"aped depending on conte,t. In Arabi&, for instance, le0ers have diferent s"apes depending on w"ether t"ey come at the beginning o a $ord, in t"e midd%e, or at the end. Te user types a le0er and t"e appropriate s"ape is dis3 p%ayed. In languages li!e Arabi&, the operating system automati&al%y app%ies the needed O* eatures wit"out intervention by the user. Windo$s and Linu, use O* to support su&" com3 p%e, s&ripts (5ac O6 X uses a diferent te&"no%ogy for this(. /n languages t"at do not re8uire res"aping, O* provides ac&ess to many re9nements tradition3 al%y used in hig"38ua%ity typograp"y. In the remainder o t"is arti&%e we wi%% fo&us on su&" ty3 pograp"i& features t"at users may wis" to app%y to their te,t. Here is one e,amp%e. Numerals can be %ining 012;4<=7>? or o%dsty%e 0123456789. Te la0er are designed to ft be0er among words in running te,t. Eac" numera% can be designed to take up t"e same widt" as the others, w"i&" makes num#ers in tab%es line up ni&e%y, or numerals can be proportional, w"ere ' or instance ) ‘1B is narro$er t"an ‘0B. :e was born on June 10, 17>1 in a smal% vi%%age. 4ining tabu%ar numerals :e was born on June 10, 1781 in a smal% vi%%age. )%dsty%e tabu%ar numerals :e was born on June 10, 1781 in a smal% vi%%age. )%dsty%e proportional numera%s )penType inc%udes features for lining, o%dsty%e, tabu%ar and proportional numerals. Most fonts use lining tabu%ar numera%s as t"e de au%t, alt"ough some feature o%dsty%e unless lining numerals are spe&i9&al%y re8uested. Cont designers use four3&"aracter codes to spe&i y O* features, su&" as t"e fo%%o$ing: lnum = lining numerals onum = oldstyle numerals tnum = tabu%ar numerals pnum = proportional numerals B. Using the four-character codes 6ome programs inc%ude a user inter ace with pu%%3do$n menus, c"e&!#o,es, and so forth to ac&ess O* features. I%%ustration 1 s"o$s ho$ O* features are ac&essed in the open-sour&e pu#%is"ing program S&ri#us.1 At this time (5ay 2017(, Li#re)E&e does not have this kind o inter ace, alt"ough it may in the future. Instead, you need to use the four3&"aracter codes mentioned above. Part I/ e,p%ains ho$ to do this. :ere are the codes for some common O* features. smcp sma%% capita%s2 c2sc &apitals c"anged to smal% capitals liga &ommon ligatures dlig dis&retionary ligatures frac diagonal fractions A more comp%ete list is found in the Wi!ipedia %ist o typograp"i& features. §§1.4, 1.6, and 1.7 of this arti !" d"a! with f"at$r"s that ar" r"!"%ant to s ri&ts s$ h as Latin and Gr""). Fou s"ou%d consu%t the do&umentation t"at &ame with your font to fnd out w"i&" O* eatures are inc%uded. (Do&umentation may not inc%ude the four3&"aracter codes, under the assumption t"at users wi%% have a grap"3 i&al inter ace avai%ab%eG t"e Wi!ipedia arti&%e &an he%p you lo&ate the codes i needed.( I there is no do&umentation, you can try a fea3 ture and see i it wor!sG i it doesn’t, no "arm is done. Tis do&ument is set in t"e ont Li#ertinus Seri , an open-sour&e font $ith many O* featuresG a%% e,amp%es make use o this font unless other$ise noted. 4i#ertinus is an ofs"oot o Linu, Li#ertine, and t"e 4inu, Li#ertine we#site s"o$s e,3 amp%es o the various features and is a good $ay to learn about O* i you are ne$ to it. II. Using OpenType in LibreOfiie 5ost testing for this arti&%e was done with 4) Writer. Limited testing with Impress and Draw indi&ates t"at the O* features also $or! in those programs. A. Turning single features on or of 5ost O* features are turned of unless you e,p%i&itly turn t"em on. I a feature is le+ /%%ustration 1: A grap"ical inter ace or )* eatures. 1 2is screenshot is from ver. 1.;.5, a deve%opment versionG hopefu%%y t"is wi%% be oE&ia%%y re%eased soon. 2 )* fonts can contain proper%y designed sma%% capita%s. Some programs display sma%% caps by shrin!ing t"e fu%%3siHed le0ers, but t"ese o+en loo! spind%y and bad%y spa&ed. True sma%% caps can have slight%y t"i&!er stems to wor! be0er at sma%% siHes and have t"e spa&ing bet$een le0ers optimiHed. OpenType Features in LibreOfiie version 1.2 page 2 of, you see the de au%t c"aracter s"ape t"at the designer put into the font; i a feature is turned on, an alternate s"ape appears. To turn on o%dsty%e numera%s, go the bo, on t"e too%#ar w"ere the font name is disp%ayed *4i#ertinus Seri , in this do&ument+, put the cursor at t"e end o name, and type a co%on fo%%o$ed by the four3&"aracter code: Libertinus Serif:onum 2en hit IJKIL to app%y t"e c"ange. I%%ustration 2 s"o$s t"is contro%. Here the Cardo font is in use and we are app%ying an O* feature cal%ed Sty%isti& Set 1, w"ose four3%e0er code is ss01. / the font name is long, it may be diE&u%t to p%ace the cursor at t"e endG in t"is case, p%ace it any$"ere in t"e name and hit en, or use t"e rig"t arro$ !ey. You also can empty t"e bo, and type the font name p%us t"e &o%on and t"e feature, alt"ough it’s usua%%y more ac&urate to use the e,isting name. Illustration 2: An OT feature specified in LO’s font control. / you wis" to app%y an O* feature to te,t a%ready entered, se%e&t t"e te,t be ore editing the ont name. I you don’t se%e&t any te,t and spe&i y an O* feature, any te,t typed t"ereafer wi%% "ave this feature active unti% you turn it of. 6ome features are turned on by de au%t in Li#re)E&e, su&" as standard ligatures. I for some reason you wis" to turn su&" a feature of, type =0 afer t"e feature name, li!e t"is: 'de au%t) 4i#ertinus Seri :%iga=0 2e eE&ient fs" ooats wit" ligatures. *"e; less e Oi&ient fis" f%oats wit"out ligatures. /n fact, te&"ni&al%y you s"ou%d type =1 to turn a feature on (%iga=1(, but 1 is the de au%t value so you don’t need to spe&i y it. =0 turns a feature of. B. Using more than one feature at once Fou can turn on more t"an one feature at once by p%acing an ampersand between feature names, as in the fo%%o$ing w"i&" turns on proportional o%dsty%e numerals: Libertinus Serif:onum&pnum Not a%% com#inations o features are designed to wor! toget"er, and some font makers take greater care in t"is regard than others. So use common sense and e,periment as needed. 6ometimes it maters w"i&" feature you spe&i y frst and sometimes it doesn’t. ; 4i#ertinus Serif in&%udes t"e T3" ligature in t"e Common Ligatures feature, so it is turned o1 here. Many fonts put t"is combination under Discretionary Ligatures. Variations li!e t"is are o+en found wit" certain O* features, w"i&" is w"y font designers shou%d provide do&umentation and users need to consu%t it. OpenType Features in LibreOfiie version 1.2 page 3 Fou can also use a hyp"en/minus sign to turn a feature of.