[luatex] luatex - font encoding for type 1 fonts

Hans Hagen pragma at wxs.nl
Sun Jun 26 16:29:14 CEST 2016


On 6/26/2016 4:13 PM, Pali Rohár wrote:
> On Sunday 26 June 2016 13:25:11 Pali Rohár wrote:
>>   dup 34 /quotedblright put
>>   dup 92 /quotedblleft put
>>   dup 254 /quotedblbase put
>>   dup 255 /csquotedblright put
>
> Hans, this remind me, how to print above characters with your font
> loader? In pdftex it is done by:
>
>   \chardef\clqq=254\sfcode254=0
>   \chardef\crqq=255\sfcode255=0
>   \def\uv#1{\clqq#1\crqq}
>
>   \chardef\elqq=92
>   \chardef\erqq=34
>   \def\qq#1{\elqq#1\erqq}
>
>   \uv{text in czech quotes}
>   \qq{text in english quotes}
>
> In czech and slovak text is used different style of quoting and CSFonts
> are prepared for it. Right czech quote is very similar to left english
> quote and for these reasons lot of fonts have only one glyph for both
> right czech and left english (under name quotedblleft).
>
> But CSFonts differs between two characters and have two very similar
> (but slightly different) glyphs. Left english quote is under name
> quotedblleft and right czech under csquotedblright.
>
> Glyph name csquotedblright is custom non-standard and so it is not in
> any glyphtounicode mapping list. There is also no special Unicode
> character for it and U+201C should be used.
>
> Now I'm thinking that luatex must have problem if there are two
> characters which needs to be mapped to U+201C...
>
> But it should be enough if user is able to define own macro \uv to works
> correctly (no need to type unicoded quotes in input tex file). How to do
> that?
>
> Also I think that your font loader could have problems with glyph name
> "csquotedblright" as it is not any standard one...

these become private unicodes :

fonts           > tfm loading > glyph 'althyphen' in font 'csr10' with 
encoding 'csr' gets unicode U+F0000
fonts           > tfm loading > glyph 'csquotedblright' in font 'csr10' 
with encoding 'csr' gets unicode U+F0001
fonts           > tfm loading > glyph 'polishlcross' in font 'csr10' 
with encoding 'csr' gets unicode U+F0002

so, you need to use

\chardef\crqq="F0001

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list