Bug 30225 - Request to store OS/2.sFamilyClass and OS/2.Panose in fontconfig cache file
Summary: Request to store OS/2.sFamilyClass and OS/2.Panose in fontconfig cache file
Status: RESOLVED DUPLICATE of bug 29497
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.8
Hardware: Other All
: medium normal
Assignee: Keith Packard
QA Contact: Behdad Esfahbod
Depends on: 29497
  Show dependency treegraph
Reported: 2010-09-16 04:15 UTC by suzuki toshiya
Modified: 2011-03-14 15:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

A preliminary patch to cache OS/2.sFamilyClass & OS/2.Panose (16.50 KB, patch)
2010-09-16 04:15 UTC, suzuki toshiya
Details | Splinter Review

Description suzuki toshiya 2010-09-16 04:15:41 UTC
Created attachment 38742 [details] [review]
A preliminary patch to cache OS/2.sFamilyClass & OS/2.Panose

As posted in mailing list

I propose to store OS/2.sFamilyClass and OS/2.Panose data in fontconfig cache file.

Some office documents (ODF, OOXML), page description languages (PDF, PCL) and
CSS may lookup the font resource by using Panose values.

PDF Reference 6th edition (for PDF version 1.7)
5.7.2 Font Descriptors for CIDFonts

	see the description for "Style" entry which
	includes 2 bytes from OS/2.sFamilyClass,
	10 bytes from OS/2.Panose.

20.8.3 The `font-face' element

	there are many elements inherited from CSS2,
	including Panose.

14.6.1 CSS2/SVG Font Descriptors

	ODF adopted the elements for the fonts from
	CSS2 and SVG, so even the font is for the text
	(not for embedded scalable graphics), it may
	have Panose value in the svg:panose-1 attribute.
ISO/IEC 29500-1:2008 panose1 (Panose-1 Typeface Classification Number)

	OOXML have several font properties (GDI parameters,
	Panose, and supported unicode range). In 17.8.2 Font
	Substitution, there is a list of properties to be
	used in the font substitution, and panose is described
	as the highest priority.

"PCL 5e Technical Quick Reference Guide"
"PCL5 Comparison Guide"

	PCL5 selects the font by giving Panose parameters
	sequentially and narrowing down the candidates,
	see PCL 5e Technical Quick Reference Guide p 11-15.

	See table 1-1 "PCL5 Feature Support Matrix" in
	page 1-12 PCL5 Comparison Guide, many PCL5
	implementations support the feature to narrow
	down by Panose parameters.

	Also PCL6 (PCL XL) supports the feature by
	giving a string of PCL5 commands to PCLSelectFont
In addition, current fontconfig does not have easy element to
be related with CSS's 5 family classification (serif, sans-
serif, cursive, fantasy). I think getting FamilyClass & Panose
values from fontconfig cache may be helpful, because the
application don't have to open a face, load OS/2 table,
check FamilyClass/Panose values, close a face.

The font selection by the matching of familynames & charsets
leaves a room for an improvement, because severeal documents
formats (and CSS) have these properties in the documents.


FreeType2 provides the interface to access them from FT_Face object, so they can
do Panose value checking out of fontconfig library. But if fontconfig can cache these
values, the application programs can reduce the cost to open/check/close font files by
themselves. I attached preliminary patch to cache them.
Comment 1 suzuki toshiya 2010-09-28 07:03:19 UTC
Link to existing request of feature, bug #29497,
which asks for serif/sans-serif distinction by
IBM sFamilyClass and Panose.
Comment 2 Behdad Esfahbod 2011-03-14 15:14:35 UTC

*** This bug has been marked as a duplicate of bug 29497 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.