IPP> Fonts

IPP> Fonts

Thomas Nilsson thomas.nilsson at streamserve.com
Fri May 21 05:37:21 EDT 1999


Tom,

The following attributes for a a font would be most valuable...

Font attributes
===========

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

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

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

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

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

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

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

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

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


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

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

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

   A list of shortInteger x-advance value followed by the y-advance value in the same order as    the character set.
      If we use the same values as in the example above and we know that for 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.

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

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

   A list of character, x-advance and y-advance values.

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

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

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

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

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


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

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


Setting the font
===========

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


Thanks,
Thomas 


More information about the Ipp mailing list