Hagen - Pragma ADE

Hagen - Pragma ADE Hagen - Pragma ADE

context.aanhet.net
from context.aanhet.net More from this publisher
13.07.2013 Views

134 Extensions characters to improve the visual appearance and use full protrusion for hyphens (and maybe punctuation). protrusion classes In ConT E Xt we’ve always defined protrusion as a percentage of the width of a glyph. From MkII we inherit the level of control as well as the ability to define vectors. The shared properties are collected in so called classes and the character specific properties in vectors. The following classes are predefined: name vector factor left right alpha alpha 1.00 double 2.00 1.00 1.00 preset 1.00 1.00 1.00 punctuation punctuation 1.00 pure pure 1.00 quality quality 1.00 The names are used in the definitions: \definefontfeature[default][protrusion=quality] Currently adding a class only has a Lua interface. \startluacode fonts.protrusions.classes.myown = { vector = 'myown', factor = 1, } \stopluacode protrusion vectors Vectors are larger but not as large as you might expect. Only a subset of characters needs to be defined. This is because in practice only latin scripts are candidates and these scripts have glyphs that look a lot like each other. As we only operate on the horizontal direction characters like ‘aàáâãäå’ look the same from the left and right so we only have to define the protrusion for ‘a’. As with classes, you can define your own vectors: \startluacode fonts.protrusions.vectors.myown = table.merged ( fonts.protrusions.vectors.quality, { [0x002C] = { 0, 2 }, -- comma }

) \stopluacode protrusion vector pure U+0002C 0.00 , 1.00 U+0002D 0.00 - 1.00 U+0002E 0.00 . 1.00 U+0003A 0.00 : 1.00 U+0003B 0.00 ; 1.00 protrusion vector punctuation U+00021 0.00 ! 0.20 U+00028 0.05 ( 0.00 U+00029 0.00 ) 0.05 U+0002C 0.00 , 0.70 U+0002D 0.00 - 0.70 U+0002E 0.00 . 0.70 U+0003A 0.00 : 0.50 U+0003B 0.00 ; 0.50 U+0003F 0.00 ? 0.20 U+0005B 0.05 [ 0.00 U+0005D 0.00 ] 0.05 protrusion vector alpha U+00041 0.05 A 0.05 U+00046 0.00 F 0.05 U+0004A 0.05 J 0.00 U+0004B 0.00 K 0.05 U+0004C 0.00 L 0.05 U+00054 0.05 T 0.05 protrusion vector quality U+00021 0.00 ! 0.20 U+00028 0.05 ( 0.00 U+00029 0.00 ) 0.05 U+0002C 0.00 , 0.70 U+0002D 0.00 - 0.70 U+0002E 0.00 . 0.70 U+0003A 0.00 : 0.50 U+0003B 0.00 ; 0.50 U+0003F 0.00 ? 0.20 U+000AD 0.00 1.00 U+0060C 0.00 1.00 U+0061B 0.00 1.00 U+006D4 0.00 1.00 U+02013 0.00 – 0.50 U+000A1 0.00 ¡ 0.20 U+000AB 0.50 « 0.50 U+000AD 0.00 0.70 U+000BB 0.50 » 0.50 U+000BF 0.00 ¿ 0.20 U+0060C 0.00 0.70 U+0061B 0.00 0.50 U+0061F 0.00 0.20 U+006D4 0.00 0.70 U+02013 0.00 – 0.30 U+02014 0.00 — 0.20 U+00056 0.05 V 0.05 U+00057 0.05 W 0.05 U+00058 0.05 X 0.05 U+00059 0.05 Y 0.05 U+0006B 0.00 k 0.05 U+00072 0.00 r 0.05 U+00041 0.05 A 0.05 U+00046 0.00 F 0.05 U+0004A 0.05 J 0.00 U+0004B 0.00 K 0.05 U+0004C 0.00 L 0.05 U+00054 0.05 T 0.05 U+00056 0.05 V 0.05 U+00057 0.05 W 0.05 U+00058 0.05 X 0.05 U+02014 0.00 — 0.33 U+03001 0.00 1.00 U+03002 0.00 1.00 U+02018 0.70 ‘ 0.70 U+02019 0.00 ’ 0.70 U+0201A 0.70 ‚ 0.00 U+0201B 0.70 ‛ 0.00 U+0201C 0.50 “ 0.50 U+0201D 0.00 ” 0.50 U+0201E 0.50 „ 0.00 U+0201F 0.50 ‟ 0.00 U+02039 0.70 ‹ 0.70 U+0203A 0.70 › 0.70 U+00074 0.00 t 0.05 U+00076 0.05 v 0.05 U+00077 0.05 w 0.05 U+00078 0.05 x 0.05 U+00079 0.05 y 0.05 U+00059 0.05 Y 0.05 U+0005B 0.05 [ 0.00 U+0005D 0.00 ] 0.05 U+0006B 0.00 k 0.05 U+00072 0.00 r 0.05 U+00074 0.00 t 0.05 U+00076 0.05 v 0.05 U+00077 0.05 w 0.05 U+00078 0.05 x 0.05 135 Extensions

134<br />

Extensions<br />

characters to improve the visual appearance and use full protrusion for hyphens (and<br />

maybe punctuation).<br />

protrusion classes<br />

In ConT E Xt we’ve always defined protrusion as a percentage of the width of a glyph.<br />

From MkII we inherit the level of control as well as the ability to define vectors. The<br />

shared properties are collected in so called classes and the character specific properties<br />

in vectors. The following classes are predefined:<br />

name vector factor left right<br />

alpha alpha 1.00<br />

double 2.00 1.00 1.00<br />

preset 1.00 1.00 1.00<br />

punctuation punctuation 1.00<br />

pure pure 1.00<br />

quality quality 1.00<br />

The names are used in the definitions:<br />

\definefontfeature[default][protrusion=quality]<br />

Currently adding a class only has a Lua interface.<br />

\startluacode<br />

fonts.protrusions.classes.myown = {<br />

vector = 'myown',<br />

factor = 1,<br />

}<br />

\stopluacode<br />

protrusion vectors<br />

Vectors are larger but not as large as you might expect. Only a subset of characters<br />

needs to be defined. This is because in practice only latin scripts are candidates and<br />

these scripts have glyphs that look a lot like each other. As we only operate on the<br />

horizontal direction characters like ‘aàáâãäå’ look the same from the left and right so<br />

we only have to define the protrusion for ‘a’.<br />

As with classes, you can define your own vectors:<br />

\startluacode<br />

fonts.protrusions.vectors.myown = table.merged (<br />

fonts.protrusions.vectors.quality,<br />

{<br />

[0x002C] = { 0, 2 }, -- comma<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!