[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font help



>
> because, CUPS wasnt printing any arabic at all, and i wanted to test
> it and see what it takes to output Raw arabic (unshapped/LTR). now
> they say they need 1 font for both 0x600 and 0xFE70 (Form-B), so
> i gotta go back to ttf2pt1 and see how this might be done.
>
> btw, they say that Type-1 by default is 8-bit encoded (or something)
> and that you can fit more than 256 glyphs in there, and they would be
> encoded, not just have glyph names.
>
 
yes, Rouzbeh mentioned this too. You can have any number of glyphs, as far as 
I am aware. It's the encoding that allows you to access the glyphs, and only 
256 glyphs can be in one encoding at a time. If you want to access more than 
256 glyphs then you need to keep changing the encoding each time you come 
across a glyph that is not in the current encoding.

Each glyph in the font has a name, and not a number. As explained earlier, the 
number value in the document is mapped to the glyph name via the encoding. 

A quick example of an encoding:

['/exclamdown','/cent','/sterling','/fraction',
 '/yen','/florin','/section','/currency','/quotesingle','/quotedblleft','/guillemotleft','/guilsinglleft','/guilsinglright',
 '/fi','/fl','/.notdef','/endash','/dagger','/daggerdbl','/periodcentered','/.notdef','/paragraph','/bullet']

so to access the glyph of name 'fraction' in your font file, with this 
encoding you would need the byte 3 in your character stream. Hence, by 
changing the encoding, the same stream of bytes in your document will give 
totally different glyphs.

Another example, you could have 512 glyphs in your font file. Encoding A would 
list the first 256 glyphs, encoding B the last 256. Only one encoding can 
apply at a time so the encoding would need to be changed each time a 
character from the other set is required. I'll email you a postscript file of 
mine that sets up an encoding for an arabic font at the start of the 
postscript file (using the Baghdad Type 1 font).

In case you don't realise, the encoding is specified in the *document* and 
*not the font*. There is a default encoding which is used if no other 
encoding is specified in the document. This is based on a standard latin 
encoding and that's why I suggest using that and then CUPS does not need to 
inject alternative encoding definitions into its output postscript file.

However, they obviously know far more about it than me, I'm just telling you 
this in the hope it helps you a bit in digesting what they want you to do.

Regarding creating a font with 0x6000 and 0xFE70 combined, why not create two 
Type 1 fonts with the utility and then combine them using something like 
pfaedit (fontforge)?

wassalaam
abdulhaq