I've been busy writing a paper on Xft and thinking about face aliases.  I 
believe there are two essential reasons to use aliasing -- the primary one 
is to provide suitable replacements when the requested face is not 
installed.  A secondary one is to expose preferences for "better" looking 
faces, and to provide for well-known artificial names.  I think both
of these can be resolved with a relatively simple syntax:

alias "serif" prefer "Times";
alias "Times" prefer "Times New Roman" accept "Charter","LuciduxSerif";

These are semantically equivalent to the following match/edit rules:

match
        any family == "serif"
edit
        family += "Times";

match
        any family == "Times"
edit
        family += "Times New Roman";
        family =+ "LuciduxSerif";
        family =+ "Charter";
        
I'm still thinking about how to perform post-match pattern editing; that 
seems important to resolve the issue of how to select options based on the 
font that was selected instead of the pattern used to do the selecting.  
It seems that we should simply create separate lists of editing commands, 
one applied to the pre-match pattern and one to the post-match font name.  
How about:

        match-pattern

and

        match-font


Alternatively, we could use a keyword at the end of the pattern, but
that seems like it might be harder to parse by simplistic applications.

I could generate an error when loading the configuration file if
inappropriate edits were performed in either step.

To ease the automatic parsing of the file, I propose that the edits
be bracketed:

        match-font {
                size > 8
                size < 14
            edit
                antialias = false;
        }

Because I expect to need edits specific to X as well as global edits, I 
propose that the underlying library read not only it's own internal 
configuration file, but also a configuration file specific to the 
environment in which it is used.  This should be useful for other systems 
as well.  This could be extended to automatically include configuration 
files placed in each font directory.

If this seems reasonable, I'm going to move forward with splitting Xft 
into two parts to create a library that is independent of X to be used for 
configuring and customizing fonts for all applications.  This library 
should become a part of all system installations, even those without X and 
needs to have a configuration mechanism that doesn't depend on the X 
installation.

[EMAIL PROTECTED]        XFree86 Core Team              SuSE, Inc.


_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to