3

Backdrop : I am trying to generate some fonts.

1) In an .mf file, I have the following assignments.

c_a             := ASCII "a";   %%\def\odvowela{a}
                                %%\def\odvowelaa{aA}
c_i             := ASCII "i";   %%\def\odvoweli{i}
c_ii            := ASCII "I";   %%\def\odvowelii{I}
c_u             := ASCII "u";   %%\def\odvowelu{u}
c_uu            := ASCII "U";   %%\def\odvoweluu{U}
cs_ddha         := 175;         %%\def\odsecDha{\char175}
cs_ta           := 174;         %%\def\odsecta{\char174}
cs_tha          := 195;         %%\def\odsectha{\char195}   \def\odseccha{\char195}
cs_na           := 240;         %%\def\odsecna{\char240}

I would like to assign Unicode hex values instead of ASCII values. Is the assignment the correct syntax ?

c_a              := 0x0B05;     %%c_a  := \u0b05 

2) Also what if the assignment involves multiple Unicode symbols ? For instance, for କ୍ଷ୍ମ the Unicode symbol is \u0b15\u0b4d\u0b37\u0b4d\u0b2e. I would like the following assignment

c_k_ss_ma        := \u0b15\u0b4d\u0b37\u0b4d\u0b2e;  %%c_k_ss_ma = କ୍ଷ୍ମ

Thank you.

nsoum
  • 240
  • 1
    Related? http://tex.stackexchange.com/questions/289982/how-to-type-unicode-in-plain-tex?rq=1 ? – cfr Jan 29 '16 at 04:31
  • I'm not sure this is possible in this way. As mentioned in comments on your other question, Xe/LuaTeX can deal easily with unicode, but I'm not sure how well it would deal with MetaFont fonts with these assignments. I don't really know, but this seems potentially... potentially a bit hair-raising. – cfr Jan 29 '16 at 04:33
  • 1
    afaik, Metafont is designed to work only with 8 bit fonts, so you are basically out of luck. However, you can trick dvi drivers of the postscript family to produce unicode aware ps/pdf with the aid of enc files. – jarnosc Jan 29 '16 at 05:31

1 Answers1

3

afaik, Metafont is designed to work only with 8 bit fonts, so you are basically out of luck. However, you can trick dvi drivers of the postscript family to produce unicode aware ps/pdf with the aid of enc files. So generate your font within the 8 bit range and prepare an enc file to feed the driver in due course.

jarnosc
  • 4,266