[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Re: monospaced font
From: |
Nelson H. F. Beebe |
Subject: |
[Freetype] Re: monospaced font |
Date: |
Tue, 19 Feb 2002 06:37:46 -0700 (MST) |
Xuqiang Bai <address@hidden> asks on Tue, 19 Feb 2002 20:35:14 +0900
>> Could anyone tell me the mean of "monospaced font"?
A `monospaced' font is also called a `fixed-width' font: all
characters have the same width.
Typewriter fonts, and most usable screen fonts, have this
characteristic.
In the X11 Window System, such fonts can be identified by their long
name having the value `m' in field 12:
-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
---------------------------------------------^
You can find all such fonts on a UNIX system like this:
xlsfonts | awk -F- '$12 == "m"'
The other kind of font is called a `proportional' font, and the X11
Window System identifies them with a value of `p' in field 12:
-urw-itc bookman-light-i-normal--0-0-72-72-p-0-iso8859-1
-------------------------------------------^
PostScript font AFM (Adobe Font Metric) files distinguish the two
types like this:
Fixed-width:
IsFixedPitch true
Proportional:
IsFixedPitch false
The PostScript font .pfa (ascii) and .pfb (binary) outline font files
contain a similar flag:
Fixed-width:
/isFixedPitch true def
Proportional:
/isFixedPitch false def
For the binary format, you first need to convert the font to the ascii
format:
t1ascii < foo.pfb | grep /isFixedPitch
The TypeType font format does not appear to include a similar flag,
but you can examine the advance-width values like this:
% ttfdump -t hmtx CourierNew.ttf | more
...
'hmtx' Table - Horizontal Metrics
---------------------------------
0. advWid: 1229, LSBear: 103
1. advWid: 0, LSBear: 0
2. advWid: 1229, LSBear: 0
3. advWid: 1229, LSBear: 0
...
238. advWid: 1229, LSBear: 13
239. advWid: 1229, LSBear: 17
240. advWid: 1229, LSBear: -27
241. advWid: 1229, LSBear: 708
Notice that for this font, the advWid values are identical (except for
character 1, which probably does not have a visible glyph).
Many people find proportional fonts hard to use on the screen at small
sizes, because it is very difficult to select text accurately with
cut-and-paste operations when characters have different widths, and
some, like punctuation and `i' are extremely narrow, perhaps only one
pixel wide. Such fonts also make it impossible to line up tabular
material properly on the screen or in print with simple use of tabs
and spaces. For that reason, most textbooks use fixed-width fonts for
display of computer input and output.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- Center for Scientific Computing FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah Internet e-mail: address@hidden -
- Department of Mathematics, 322 INSCC address@hidden address@hidden -
- 155 S 1400 E RM 233 address@hidden -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe -
-------------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] Re: monospaced font,
Nelson H. F. Beebe <=