There is a better font if you need only symbols, choose the "Unicode Symbols" link on the following page.
I'm trying to use Unicode.otf from http://users.teilar.gr/~g1951d I just copied it into texmf/fonts/opentype/unicodesymbols/Unicode.otf run luatools --generate and test %%%test0012.tex \definefont[WhatEver][Unicode] \starttext \WhatEver Hello \stoptext with texmfstart texexec --luatex test0012.tex Result: !luaTeX error (file /opt/texlive/ContextMKiv/tex/texmf/fonts/opentype/public/unicodesymbols/Unicode.otf): can't find table `CFF ' ==> Fatal error occurred, no output PDF file produced! (I'm using This is LuaTeX, Version snapshot-0.20.2-2007121721 (Web2C 7.5.6) ConTeXt ver: 2008.01.02 14:18 MKIV fmt: 2008.1.10 int: english/english ) Hence, I saved Unicode.otf as UnicodeSymbols.otf with fontforge (saved as Opentype CFF) %%%test0012.tex \definefont[WhatEver][UnicodeSymbol at 100pt] \starttext \WhatEver Hello \stoptext now works . Do I have make some mistake ? And How can I quicky access symbols like U+25c9 ? -- luigi it's new . it's powerful . it's luatex . http://www.luatex.org
This seems to be a slight misfeature in Mark IV: I take that when opening a font file with an .otf extension, it assumes it is an OpenType font with PostScript outlines (cubic splines); when the file has a .ttf extension, it supposes there are TrueType outlines (quadratic splines). Both types of outlines are mutually exclusive and are contained in different tables of the font file (respectively, 'CFF' and 'glyf'). This is indeed a widespread convention (including FontForge's), but this font doesn't follow it, since it has TrueType outlines and an .otf extension; hence the error message (ConTeXt is looking for a CFF table and can't find it, since there is a glyf table instead). When you edited the font in Fontforge and exported it as UnicodeSymbols.otf, it was converted to a CFF-based OpenType font, so ConTeXt could use it. I consider this a bug in Mark IV (I think the problem is really in ConTeXt, not LuaTeX). It should be able to use the original font, even if this extension thing is annoying.
And How can I quicky access symbols like U+25c9 ?
One would think you knew that, Luigi! Just use ^^^^25c9, for example. Arthur
On Jan 11, 2008 5:03 AM, Arthur Reutenauer
This seems to be a slight misfeature in Mark IV: I take that when opening a font file with an .otf extension, it assumes it is an OpenType font with PostScript outlines (cubic splines); when the file has a .ttf extension, it supposes there are TrueType outlines (quadratic splines). Both types of outlines are mutually exclusive and are contained in different tables of the font file (respectively, 'CFF' and 'glyf'). This is indeed a widespread convention (including FontForge's), but this font doesn't follow it, since it has TrueType outlines and an .otf extension; hence the error message (ConTeXt is looking for a CFF table and can't find it, since there is a glyf table instead).
When you edited the font in Fontforge and exported it as UnicodeSymbols.otf, it was converted to a CFF-based OpenType font, so ConTeXt could use it.
I consider this a bug in Mark IV (I think the problem is really in ConTeXt, not LuaTeX). It should be able to use the original font, even if this extension thing is annoying. Is there another solution other than fontforge ? I mean, I was not able to use original font without processing it with font forge.
And How can I quicky access symbols like U+25c9 ?
One would think you knew that, Luigi! Just use ^^^^25c9, for example.
ok. 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 . -- luigi it's new . it's powerful . it's luatex . http://www.luatex.org
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. Arthur
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) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
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
luigi scarso wrote:
On Jan 11, 2008 4:29 PM, Hans Hagen
wrote: 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,
wel, we can make a characters.context.descriptions but i'm not sure if it will really be used, because when one knows this rather verbose string (has looked it up), one could as well use the (also found) unicode directly ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
wel, we can make a characters.context.descriptions but i'm not sure if it will really be used, because when one knows this rather verbose string (has looked it up), one could as well use the (also found) unicode directly
That's what I thought at first, but then I realized it could be useful for characters with diacritics, whose names are much more predictable in general (at least for some diacritic marks). And then you could add named sequences (http://www.unicode.org/Public/UNIDATA/NamedSequences.txt) which are a couple of additional names for some specific *sequences* of Unicode characters. Arthur
(Am I wrong if I said that 'BOX DRAWINGS UP LIGHT AND LEFT HEAVY' is normative ?)
No, you're right, Unicode names are absolutely normative. So normative, actually, that Unicode and ISO guarantee that they will never change, ever (they're among the very few so-called stable properties). But, as already said, in the case of symbols, I don't think they're really useful to the end user. Arthur
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. If you mean simple rename to Unicode.ttf, copy into appropriate dir, luatools --generate, well ,
On Jan 11, 2008 4:22 PM, Arthur Reutenauer
If you mean simple rename to Unicode.ttf, copy into appropriate dir, luatools --generate, well , this did not work last night.
This can be caused by a number of things: 1. The original font file name was still stored in the cache. 2. You kept Unicode.otf along with Unicode.ttf, and ConTeXt ignored the latter. 3. A combination of the two. If I clear the Unicode.tm? files in the cache and suppress Unicode.otf altogether, it works on my machine. Arthur
On Jan 11, 2008 7:15 PM, Arthur Reutenauer
If you mean simple rename to Unicode.ttf, copy into appropriate dir, luatools --generate, well , this did not work last night.
This can be caused by a number of things:
1. The original font file name was still stored in the cache. 2. You kept Unicode.otf along with Unicode.ttf, and ConTeXt ignored the latter. 3. A combination of the two.
Works as expected now ConTeXt ver: 2008.01.11 12:09 MKIV fmt: 2008.1.12 int: english/english This is LuaTeX, Version snapshot-0.20.2-2007121721 -- luigi it's new . it's powerful . it's luatex . http://www.luatex.org
participants (3)
-
Arthur Reutenauer
-
Hans Hagen
-
luigi scarso