How to access private glyphs in a font

Ive been trying to get hold of a font that has more than 250 shapes in it.
There are ‘nogo’ areas in the middle of the ascii range around the 127 mark.

But I have a font that can generate glyphs in that range… I ask for Chr(130) and I get a character.
Im told that this may be due to the use of private glyphs and so I have a font now where glyphs are present, yet I cant see any of them

Im trying to access them using Chr(33) chr(34) and so on.

How do you access a private glpyh?
Do you have to somehow force a codepage or an encoding on the request?

In a font editor, one glyph is described a ‘B’ another as ‘UniF046’
Another as ‘colon’
I cant reconcile these to chr(n) access

If a glyph does not have a Unicode value, you simply cannot access it.

is probably &uf046

but that is WAY outside the 0x00 to 0xff range… but that range is so 1990’s :slight_smile:

Actually, a glyph can be called anything. Indeed UniF046 is the usual way Fontlab names glyphs when it does not know its name. But it can be called Marcel or Jessica, the only thing the imager uses is the Unicode encoding.

My head explodes with this.

Yup… I expected to be able to address chr(33) to 255
chr(65) = “A” as any fule kno.

And ‘obviously’ unicode/double byte values to get higher than xFF

As it stands, the thing I had to do to get at the extra shapes is to tell the PDF that the code page is something described as ‘GlyphIndices’ …

basically we dont care what the name is or the unicode number, just give me first, second, third shape and so on.
Its taken me days to stumble over this ‘solution’

Seconding Dave S. F046 is in Unicode’s Private Use Area, intended for just this kind of situation. The font has probably assigned code point U+F046 to that glyph and named it accordingly. If so, then using &uF046 with that font will give the glyph in question. Of course, using it with another font will yield a completely different glyph.

That said, if the GlyphIndices method works for the purpose of making a PDF, go for it. Just don’t expect it to work in other contexts,

[quote=342237:@Jeff Tullin]Ive been trying to get hold of a font that has more than 250 shapes in it.
There are ‘nogo’ areas in the middle of the ascii range around the 127 mark.

But I have a font that can generate glyphs in that range… I ask for Chr(130) and I get a character.
Im told that this may be due to the use of private glyphs and so I have a font now where glyphs are present, yet I cant see any of them

Im trying to access them using Chr(33) chr(34) and so on.

How do you access a private glpyh?
Do you have to somehow force a codepage or an encoding on the request?

In a font editor, one glyph is described a ‘B’ another as ‘UniF046’
Another as ‘colon’
I cant reconcile these to chr(n) access[/quote]

CHR is well defined for the range &h00 to &h7f - since that is the ENTIRE ASCII range which is all CHR was previously well defined for see http://documentation.xojo.com/index.php/Chr
The Chr function returns a string in ASCII encoding for values less than 128 and a UTF-8 encoded string for all other values. If you need to control the exact byte value, you should instead call ChrB.

From &h80 and up you get the unicode character

[quote=342313:@Jeff Tullin]
Yup… I expected to be able to address chr(33) to 255 [/quote]
Nope. Wont work. See above