>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)iskon.hr> writes:
Hrvoje> Ben Wing <ben(a)666.com> writes:
> Why not add built-in face properties like font-family,
Font-family is at best a hint, and sometimes completely misleading.
See footnote 2.
> font-weight, font-slant, etc.? Otherwise you arbitrarily stick
> some properties inside of property lists hung off a single
> property, and other properties are direct face properties.
> Ugly ugly ugly.
Hrvoje> I agree. The distinction between "face properties" and
Hrvoje> "font properties" is often quite arbitrary.
Not at all. A "face property" is "what we want to see", a logical
property. A "font property" is "how we get what we want to see out of
the system display mechanism." In the old X font model (pre-XLFD),
there was only one font property AFAIK: its name. Even with XLFD,
that's more or less true.
Remember that originally a font was a collection of glyphs, divided
into subsets called faces. Using multiple fonts was extremely
expensive until computer typesetting became possible. Now the logical
role of face is what we want to think about, and one of the
implementation tools for differentiating faces is to change font.
That is, the old relationship, face is a subset of font, has been
inverted.
This is the root of the "font model problem": different fonts, even
from the same foundry, will have different models (in the sense that
the units of "weight", "size", etc will be different and annoying or
even hard to coordinate across fonts and font families, or even the
font metrics will be different). But in modern applications, we need
to do this kind of coordination, more or less automatically, on behalf
of users who just want an 18-pt version of the 14-pt face they like a
lot.
I'm not at all sure I disagree with Kyle. It depends on how well we
want to do things. I would be tempted to have a face model[1] with
all the parameters we can imagine (size, slant, aspect ratio, family-
list[2], color, strikeout, underline, etc) plus a series of plists
named things like "x-font-hints", "windows-font-hints", etc. The
semantics of the hints would be that they are derived from the face
parameters and passed to XListFontsWithInfo(3x) and equivalents for
other rendering engines. Then the information returned is compared to
the face parameters to pick the best one.
Footnotes:
[1] I propose the terminology that "font models" are what we use to
map the "face model" to implementation-dependent rendering facilities.
I don't expect anybody to adopt it, since "font model" is embedded
into people's brains, but I think it's worth proposing for the doubts
it may stir up.
[2] Families are not very useful in today's multiscript world, there
are few Unicode fonts and few of even those are Uni-designed; rather
they are glommed together from similar but not identical families---
this is apparently especially jarring in some TrueType Unicode fonts
where an ISO-8859-1 font is used to display ASCII and Latin-1 and a
visibly different font is used for Latin-2.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."