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

Re: Font help



I've worked a bit with the Baghdad type 1 font, to print out a vocabulary 
database I'm working on (using python and Qt, incidentally). As has been 
said, basic postscript supports 256 glyphs in a font file. Each glyph in 
postscript has a latin-style name, e.g. 'umlaut', and each font has an 
encoding. The encoding is a list of e.g. 256 glyph names. Then, when a 
document is processed by postscript, if the value of the character in the 
document is e.g. 139, then postscript gets the 139th glyph name from the 
encoding in use, and looks it up in the font by the name.

Hence to construct an encoding, this is in postscript a list (array) of 256 
glyph names in a particular order. It's the order of the names that makes the 
encoding. The glyph names are all latin font based of course but that is of 
no consequence.

If you want more than 256 characters (which you don't, for the latin/arabic 
combination), then there is a special extension for Korean, Chinese etc., but 
which is not appropriate for this case (as far as I know).

Hence to make a type 1 arabic font (if that is the question) then you need to 
pick a suitable encoding and arrange the glyphs (256 of them) in the font 
file in that order. Then the text processing software needs to know the 
encoding in use, of course. As UTF provides a 2 byte numeric, this needs to 
be mapped down to the character encoding used in the font (after shaping 
etc). For instance, the initial kaaf is UTF  0x06A9 (unshaped) 0xFEDB 
(presentation form). This needs to be changed to initial kaaf in the type 1 
font, 134 for example.


Hence the chain of logic in the printing application is 0x06A9 -> 0xFEDB -> 
char 134 (or whatever) in the font. In the postscript file produced by the 
printing application, the encoding used needs to map char 134 to the correct 
glyph (initial kaaf, but called e.g. umlaut) in the font file.

All the postscript manuals (including a detailed description of what a type 1 
font file is) can be downloaded as pdf files from the Adobe site, and they 
are very good, but take a day to digest.

I apologise for my disorganised 'explanation' and I must stress that I have 
very limited experience in this area (but more than many I think).

wassalaam
abdulhaq


On Wednesday 05 May 2004 12:51, Roozbeh Pournader wrote:
> > > do Type-1 fonts only support 255 values ???
>
> No, but you can only use 256 using numbers. The other glyphs, you may
> only get by using their glyph names.
>
> > > else if they support more than 255 values, someone has to do this too.
> > > i cant get ttf2pt1 to convert all the values in the KACST fonts. they
> > > do convert to .t1a file, but t1asm only generates 255 values...
>
> I guess there is an option that lets you chose different 256 glyph sets.
> Search for "map" or something like that.
>
> > > to sum up, i need a Postscript Type-1 font with arabic 0x600-0x6FF
> > > range please :))
>
> That will be impossible and unusable. First, I don't know a font that
> has all those glyphs. Then, that will be just isolated glyphs, which
> will be incomplete for typesetting any language. It may only be used for
> printing a Unicode chart.
>
> roozbeh
>
>
> _______________________________________________
> Developer mailing list
> Developer at arabeyes dot org
> http://lists.arabeyes.org/mailman/listinfo/developer