2

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.

  • Related? tex.stackexchange.com/questions/289982/… ? – cfr Jan 29 '16 at 4: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 4: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. – erreka Jan 29 '16 at 5:31
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.