From sacadmin Fri Aug 18 14:25:15 2006
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k7ILPF6f014067;
	Fri, 18 Aug 2006 14:25:15 -0700 (PDT)
Received: (from alanc@localhost)
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6/Submit) id k7ILPEYt014064;
	Fri, 18 Aug 2006 14:25:14 -0700 (PDT)
Date: Fri, 18 Aug 2006 14:25:14 -0700 (PDT)
From: Alan Coopersmith <alanc@sac.sfbay.sun.com>
Message-Id: <200608182125.k7ILPEYt014064@sac.sfbay.sun.com>
To: LSARC@sac.sfbay.sun.com
Cc: Jay.Hobson@Sun.COM
Subject: fontconfig Hide/Only/Poor (HOP) language matching [LSARC/2006/485 Timeout:  08/25/2006]
Status: RO
Content-Length: 4904

Subject: LSARC FastTrack [08/25/2006]: fontconfig Hide/Only/Poor (HOP) language matching

I am sponsoring this fasttrack for Jay Hobson of the X11 engineering team.
It times out on Friday, August 25 and requests a patch release binding.

        -Alan Coopersmith-           alan.coopersmith@sun.com
         Sun Microsystems, Inc. - X Window System Engineering


Template Version: @(#)sac_nextcase %I% %G% SMI
This information  Copyright 2006 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 fontconfig Hide/Only/Poor (HOP) language matching
    1.2. Name of Document Author/Supplier:
	 Author:  Jay Hobson
    1.3  Date of This Document:
	18 August, 2006
4. Technical Description

This project enhances the fontconfig library to allow fonts to have language
subsections labeled Hide/Only/Poor (HOP). This enhancement is required to allow
fonts with poor or broken language support to be used while not impacting the 
languages for which they have bad support.

An example of the requirement for this enhancement is seen in bug 6405629
where font Lucida Sans Typewriter has support for both Latin and Arabic. 
Lucida Sans Typewriter was chosen for its Latin support, but because it has
Arabic support, it is chosen over the better KacstQurn font. KacstQurn cannot
be moved above Lucida Sans Typewriter in the fontconfig alias because it
supports multiple langauges, which would force fonts for the other languages
to be moved up. These fonts in turn support Latin languages and result in 
Lucida Sans Typewriter not being chosen.

By allowing the fonts.conf file, or its derivatives, to include support for
removing, or reducing a font's support for a particular language, this problem
can be solved. In the above example, claiming that Lucida Sans Typewriter has
poor support for Arabic will cause fontconfig to continue searching for a 
better match for Arabic language support. In this case, it will correctly
find KacstQurn.

Example addition to fonts.conf:

<alias>
	<family>Sans-serif</family>
	<poor>
		<family>Lucida Sans Typewrite</family>
		<lang>ar</lang>
	</poor>
</alias>

Additional XML tags added to fontconfig:

	<hide>	- denotes language(s) to completely remove from font. This 
		  tag is used when a font contains broken glyphs, or bad
		  languages tables, claiming support where none exists.
		  This tag, and <only> below, create local copies of the
		  font pattern, remove languages from the patterns list of 
		  supported languages before performing the match to the 
		  request. In this way, the font is prevented from being
		  a match. The local copy is destroyed after the match is
		  performed.

	<lang>	- denotes language to perform operation on.

	<only>	- denotes the only language(s) that a font supports. This 
		  tag is the opposite of hide, where it may be more
		  convenient to specify the list of allowed languages
		  instead of the list of hidden languages.

	<poor>	- denotes language(s) that the font has poor quality. This
		  tag lowers the matching score for this fonts support 
		  for the specified langauge(s) allowing fonts further
		  down the alias list to be used. If no better font is
		  found to support the language in question, the poor font
		  will be selected. This ability to continue to use the
		  font if nothing better is found is the distinguishing
		  characteristic over <hide> and <only> which do not allow
		  the font to be used if nothing better is found.

	<alias>	- This existing tag is overloaded to include the HOP
		  functionality.


This modifiction only affects aliases created in fonts.conf. If a user
specifically requests a particular font, that font will be returned.

Future direction:

This new XML interface addition is being declared Volatile, because while
this patch has been contributed back to the open source community, it is 
unclear at this time which direction the community will take to resolve this
problem. At some future point, if the community standardizes on solving the 
problem in a different way, we will want to remain compatible, and this 
present solution will be backed out. 

   ---------------------------------------------------------------------------

Imported interfaces:

Interface                               Stability    	Comments
----------                              ---------    	--------
/etc/fonts/fonts.conf			External	LSARC 2003/273
/etc/fonts/fonts.dtd			External	LSARC 2003/273
/usr/lib/libfontconfig.so.1             External       	LSARC 2003/273


Exported interfaces:
--------------------

Interface                               Stability    	Comments
----------                              ---------    	--------
fontconfig HOP XML interface		Volatile	see Future Direction.




6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		X
    6.5. ARC review type: FastTrack

From sacadmin Mon Aug 28 14:51:18 2006
Received: from almas.sfbay.sun.com (almas.SFBay.Sun.COM [129.146.108.211])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k7SLpIZE014040;
	Mon, 28 Aug 2006 14:51:18 -0700 (PDT)
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by almas.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k7SLpGUt023006;
	Mon, 28 Aug 2006 14:51:18 -0700 (PDT)
Message-ID: <44F36554.403@sun.com>
Date: Mon, 28 Aug 2006 14:51:16 -0700
From: Alan Coopersmith <alan.coopersmith@sun.com>
User-Agent: Thunderbird 1.5.0.2 (X11/20060427)
MIME-Version: 1.0
To: Alan Coopersmith <alanc@sac.sfbay.sun.com>
CC: LSARC@sac.sfbay.sun.com, Jay.Hobson@sun.com
Subject: Re: fontconfig Hide/Only/Poor (HOP) language matching [LSARC/2006/485
 Timeout:  08/25/2006]
References: <200608182125.k7ILPEYt014064@sac.sfbay.sun.com>
In-Reply-To: <200608182125.k7ILPEYt014064@sac.sfbay.sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 462

Alan Coopersmith wrote:
> Subject: LSARC FastTrack [08/25/2006]: fontconfig Hide/Only/Poor (HOP) language matching
> 
> I am sponsoring this fasttrack for Jay Hobson of the X11 engineering team.
> It times out on Friday, August 25 and requests a patch release binding.

Having received no comments or objections, this case is now closed approved.

-- 
	-Alan Coopersmith-           alan.coopersmith@sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

