[Bug 744812] Re: FontConfig/Qt stack choke on Ubuntu Medium font meta-data (No medium in Inkscape and too bold in Qt apps)
Bug Watch Updater
744812 at bugs.launchpad.net
Mon Oct 8 11:09:46 UTC 2012
Launchpad has imported 9 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=38737.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2011-06-28T01:28:34+00:00 Frepdesktoh wrote:
Truetype/Opentype files have various sets of metadata, not all of which
can be directly queried/matched via FontConfig.
In particular, both the OpenStep and CSS font-matching schemes require
the "PostScript name" as the canonical form of first attempt:
http://www.w3.org/TR/css3-fonts/#ltfont-face-namegt
"the unique name used with local() specifies a single font, not an entire font family. Defined in terms of OpenType font data, the Postscript name is found in the font's name table, in the name record with nameID = 6 (see [OPENTYPE] for more details). The Postscript name is the commonly used key for all fonts on OSX and for Postscript CFF fonts under Windows. The full font name (nameID = 4) is used as a unique key for fonts with TrueType glyphs on Windows."
Previously patch(es) were offered by Isaiah Beerbower and Evgeniy
Stepanov:
http://lists.freedesktop.org/archives/fontconfig/2008-June/thread.html#2957
http://lists.freedesktop.org/archives/fontconfig/attachments/20080605/c063ded6/attachment.diff
but these do not appear to have been replied. A request is made during
the conversation to file a bug and attach the files.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/23
------------------------------------------------------------------------
On 2011-06-28T06:43:13+00:00 James H. Cloos Jr. wrote:
I also posted an RFD patch to cache and match on the postscript name.
It, too, was ignored.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/24
------------------------------------------------------------------------
On 2011-06-28T06:48:05+00:00 Frepdesktoh wrote:
James: do you have a link to your version of the patch too?
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/25
------------------------------------------------------------------------
On 2011-06-28T07:05:21+00:00 Freedesktop wrote:
James, feel free to fork fontconfig. I encourage that. If and when
distros pick up your tree, I'll hand you the fdo tree. That's what I
did to Keith afterall. Don't sound apologetic!
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/26
------------------------------------------------------------------------
On 2011-06-28T07:09:43+00:00 Freedesktop wrote:
Note that any patch to add this has to address the interaction between
searching by postscript name and family name. Just adding the
postscript name to the pattern and putting it in a random place in the
matcher is easy. Making sense of how this feature is to be used is
something I haven't seen anyone answering so far.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/27
------------------------------------------------------------------------
On 2012-09-27T15:11:46+00:00 Freedesktop wrote:
Akira, can you update this bug with your latest plans?
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/64
------------------------------------------------------------------------
On 2012-09-28T12:25:52+00:00 Akiro wrote:
Well, still thinking how to address comment#4 though, the ideas I have
so far is:
For cache:
* the change in FcFreeTypeQueryFace(): in case any fonts doesn't have TT_NAME_ID_PS_NAME, generate PS-compliant name from the family name as the printing libraries do.
For match:
* the change in FcNameParse(): we could add some code to guess if the string is more likely to be the family name or PostScript name from the existence of '-', ' ', and '-H', or '-V' as the suffix etc. set it to FC_FAMILY and/or FC_POSTSCRIPT_NAME. in some case, pre-lookup for that name may be a good idea? because it would be easy to write the mathing rules if we are sure either of the values points to the correct value. otherwise one who is responsible to maintain the rule needs to write the complicated (or duplicated) rules to match either of FC_FAMILY or FC_POSTSCRIPT_NAME then. or think about the syntax to achieve the rule like:
If pat['family'] == 'Courier' or pat['postscript'] == 'Courier' then
something
* in FcNameParse() or in fcstr.c and fclang.c:
* any function to guess the language from CMap if any.
* a special comparison mode or attribute to ignore the suffix string
like CMap. or should it be done with the above idea at pre-stage?
There should be more we need to think about, but just to share current idea.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/65
------------------------------------------------------------------------
On 2012-09-28T13:01:01+00:00 Frepdesktoh wrote:
Akira, thanks for the update!
One thought I'd like to add, regarding the synthesis of missing data; is
that when it comes to /debugging/ font-related issue, a large percentage
of the (invalid) issues relate to sythesis and substitution occuring in
FC or the toolkits. It is often the difficulty in seeing past where the
sythesis (or simplification) of data is occuring, that hampers the
debugging.
Thus, it might arguably be better to cleanly /fail/ if a request is made
for a TT_ attribute that doesn't exist (such as TT_NAME_ID_PS_NAME),
than to return something that wasn't or isn't there.
Perhaps the printing issue highlighted (where synthesis of missing
attributes is needed) could be covered with a helper function of
something like ReturnUniqueNameAsPostscript(). Such a function() (or
ENUM) could then return the TT_NAME_ID_PS_NAME if it exists, or make
something up. But in both cases, without obscuring the ability of an
application /that cares/ to uniquely query or get the raw data.
Does that make sense? I'm happy to expand on the above if not.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/66
------------------------------------------------------------------------
On 2012-09-28T14:30:37+00:00 Akiro wrote:
Well, I know there are some request of additional APIs like FcFontMatch
and FcFontSort without the substitution. we should deal with it as a
separate bug or RFE IMHO.
Reply at: https://bugs.launchpad.net/ubuntu-font-
family/+bug/744812/comments/67
** Changed in: fontconfig
Status: Unknown => Confirmed
** Changed in: fontconfig
Importance: Unknown => Wishlist
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in Ubuntu.
https://bugs.launchpad.net/bugs/744812
Title:
FontConfig/Qt stack choke on Ubuntu Medium font meta-data (No medium
in Inkscape and too bold in Qt apps)
To manage notifications about this bug go to:
https://bugs.launchpad.net/fontconfig/+bug/744812/+subscriptions
More information about the kubuntu-bugs
mailing list