On Jan 11, 2008 4:29 PM, Hans Hagen
Arthur Reutenauer wrote:
Is there another solution other than fontforge ?
Sure, just rename the font to Unicode.ttf. And the problem should be fixed now, so try the next beta with the original name as well.
I mean using by using characters.data in char-def.lua:
[0x25C9] = { unicodeslot=0x25C9, category='so', description='FISHEYE' },
it should be easy with a bit \ctxlua get glyph by description .
I guess you're better off preparing the inverse mapping and storing it in advance, otherwise you would be losing a lot of time because you would have to loop over characters.data to find the character you want.
already taken care of ...
characters.context.unicodes characters.context.utfcodes characters.context.enccodes
are references to the big table (there are more tables) I think something like this
-- begin -- save this in symbols.lua Symbols={['BOX DRAWINGS LIGHT HORIZONTAL'] = 9472, ['BOX DRAWINGS HEAVY HORIZONTAL'] = 9473, ['BOX DRAWINGS LIGHT VERTICAL'] = 9474, ['BOX DRAWINGS HEAVY VERTICAL'] = 9475, ['BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL'] = 9476, ['BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL'] = 9477, ['BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL'] = 9478, ['BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL'] = 9479, ['BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL'] = 9480, ['BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL'] = 9481, ['BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL'] = 9482, ['BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL'] = 9483, ['BOX DRAWINGS LIGHT DOWN AND RIGHT'] = 9484, ['BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY'] = 9485, ['BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT'] = 9486, ['BOX DRAWINGS HEAVY DOWN AND RIGHT'] = 9487, ['BOX DRAWINGS LIGHT DOWN AND LEFT'] = 9488, ['BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY'] = 9489, ['BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT'] = 9490, ['BOX DRAWINGS HEAVY DOWN AND LEFT'] = 9491, ['BOX DRAWINGS LIGHT UP AND RIGHT'] = 9492, ['BOX DRAWINGS UP LIGHT AND RIGHT HEAVY'] = 9493, ['BOX DRAWINGS UP HEAVY AND RIGHT LIGHT'] = 9494, ['BOX DRAWINGS HEAVY UP AND RIGHT'] = 9495, ['BOX DRAWINGS LIGHT UP AND LEFT'] = 9496, ['BOX DRAWINGS UP LIGHT AND LEFT HEAVY'] = 9497, ['BOX DRAWINGS UP HEAVY AND LEFT LIGHT'] = 9498, ['BOX DRAWINGS HEAVY UP AND LEFT'] = 9499, ['BOX DRAWINGS LIGHT VERTICAL AND RIGHT'] = 9500, ['BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY'] = 9501, ['BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT'] = 9502, ['BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT'] = 9503, ['BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT'] = 9504, ['BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY'] = 9505, ['BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY'] = 9506, ['BOX DRAWINGS HEAVY VERTICAL AND RIGHT'] = 9507, ['BOX DRAWINGS LIGHT VERTICAL AND LEFT'] = 9508, ['BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY'] = 9509, ['BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT'] = 9510, ['BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT'] = 9511, ['BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT'] = 9512, ['BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY'] = 9513} --end %%%% save this in t.tex %% UnicodeSymbols was made by saving Unicode.otf with fontforge \ctxluafileload{symbols.lua}{} \definefont[WhatEver][UnicodeSymbols at 100pt] \starttext {\WhatEver\unicodechar{\ctxlua{tex.sprint(Symbols['BOX DRAWINGS UP LIGHT AND LEFT HEAVY'])}}} \stoptext The idea is to use a normative name (Am I wrong if I said that 'BOX DRAWINGS UP LIGHT AND LEFT HEAVY' is normative ?) -- luigi it's new . it's powerful . it's luatex . http://www.luatex.org