IPP Mail Archive: RE: IPP> Fonts

RE: IPP> Fonts

Thomas Nilsson (thomas.nilsson@streamserve.com)
Fri, 21 May 1999 10:37:21 +0100

Tom,

The following attributes for a a font would be most valuable=2E=2E=2E

Font attributes
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

1=2E font (font)
Full name of the font, for example 'Courier Bold Oblique'=2E The (font) tag=20=
type is a character string=2E

2=2E font-height (integer (0:MAX))
The font height expressed in 1/720 point per inch=2E (The value 720 in=20=
order to provide an extra decimal)=2E

3=2E font-pitch (integer (0:MAX))
The font pitch expressed in 1/100 character per inch=2E (The value 100 in=20=
order to provide 2 extra decimals)

4=2E font-is-scalable (boolean)
True if the font is scalable and is not limited to certain dimensions,=20=
false otherwise=2E

5=2E font-is-pitched (boolean)
True if the font has fixed pitch values, false otherwise=2E

6=2E font-height-supported (shortIntegerList)
For non scalable fonts the new shortIntegerList tag enumerates the=20=
available heights (as shortIntegers)=2E The heights are expressed in the=20=
same unit as font-height=2E

7=2E font-pitch-supported (shortIntegerList)
For fixed pitched fonts the new shortIntegerList tag enumerates the=20=
available pitch values (as shortIntegers)=2E The pitch values are expressed=20=
in the same unit as font-pitch=2E

8=2E font-charset-default (charset)
This is the default charset for a font=2E The value depends both on the=20=
font and also on the 'document-format' (in case of different=20=
interpreters)=2E

9=2E font-charset-supported (1setOf charset)
These are the character sets available for a particular font=2E The=20=
charsets depends on the font and also on the 'document-format' (in case=20=
of different interpreters)=2E

10=2E font-metrics-format-default (enum)
I would like this attribute in order to get the font metrics (or width=20=
tables) directly from the printer for example by using a separate=20=
operation called for instance Get-Printer-Font-Metrics=2E The font metrics=20=
is often highly printer dependant and it would be very useful to get the=20=
exact metrics directly from the printer when making documents in for=20=
instance PCL or postscript=2E The following enum values are suggested=2E
Value Meaning
1: 'charset-ordered-x-advance'
=20=
A list of shortInteger x-advance value (usually the width for european=20=
fonts) in the same order as the character set=2E

For example if the character set is only three characters 'A', 'B' and=20=
'C' and the character widths are 0x0200, 0x0210 and 0x0220=2E The=20=
metrics table would be:
=20=
0x0200
0x0210
0x0220

2: 'charset-ordered-x-and-y-advance'

A list of shortInteger x-advance value followed by the y-advance value=20=
in the same order as=20=
the character set=2E
=20=
If we use the same values as in the example above and we know that for=20=
this font there is no advance in y the following would be the result:

0x0200
0x0000
0x0210
0x0000
0x0220

3: 'character-x-advance'
A list of character and x-advance pairs=2E

If using unicode as the character set and the same values as above the=20=
following table would be the result:
=20=
0x0041
0x0200
0x0042
0x0210
0x0043
0x0220

4: 'character-x-and-y-advance'

A list of character, x-advance and y-advance values=2E

If using unicode as the character set and the same values as above the=20=
following table would be the result:
=20=
0x0041
0x0200
0x0000
0x0042
0x0210
0x0000
0x0043
0x0220
0x0000

Please note that in a Get-Printer-Font request the attributes=20=
'printer-uri', 'document-format' and the 'font-charset' attributes must=20=
be defined=2E You must also specify the 'font-height' for non-scalable=20=
fonts=2E The 'font-pitch' attribute is a must for fixed-pitched fonts=2E

11=2E font-metrics-format-supported (1setOf enum)
The font-metrics-formats that this font supports=2E

12=2E font-metrics-x-base (integer (0:MAX))
This attribute would be returned from the printer in a=20=
Get-Printer-Font-Metrics response=2E The document provider calculate the=20=
real x-advance values (X) based on this value following the formula:

X =3D (x-advance/x-base) * Xresolution

13=2E font-metrics-y-base (integer (0:MAX))
This attribute would be returned from the printer in a=20=
Get-Printer-Font-Metrics response=2E The document provider calculates the=20=
real y-advance values (Y) based on this value=2E

Y =3D (y-advance/y-base) *Yresolution

Setting the font
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

When setting the font to be used during a job operation (for the document=20=
format text/plain for example) you can use the 'font-name', 'font-height'=20=
and 'font-pitch' attributes=2E If the request contain no font attributes,=20=
the printer would use the 'font-configured' and 'font-height-configured'=20=
or 'font-pitch-configured' to print the document=2E

Thanks,
Thomas=20=