You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/12/06 04:18:19 UTC

DO NOT REPLY [Bug 52289] New: Condensed font selection and identification

https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

             Bug #: 52289
           Summary: Condensed font selection and identification
           Product: Fop
           Version: 1.0
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: fonts
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: ringerc@ringerc.id.au
    Classification: Unclassified


Created attachment 28030
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28030
Fop font loading log

Fop appears to be misclassifying the font faces I have.

I'm loading the fonts by having fop scan the directory they're in using the
<fonts><directory> config param and it's finding them fine. However, Fop
doesn't seem to be able to tell the difference between the condensed and
non-condensed faces of these fonts. It also seems to think they all have the
same weight (400) as per the log excerpts below.

Here's an excerpt of the log output from fop where it detects the fonts. The
full log is at  http://pastebin.com/91u9bW10 . You can see that it seems unable
to distinguish the weights or how condensed they are:

Registering: HelveticaNeueLT Std Cn,normal,400 under F17
HelveticaNeueLT Std Cn,normal,400: Replacing HelveticaNeueLTStd-BdCn
(priority=23) by HelveticaNeueLTStd-Cn (priority=21)
Registering: HelveticaNeueLTStd-BlkCn,normal,400 under F18
Registering: Helvetica Neue LT Std,normal,400 under F18
Helvetica Neue LT Std,normal,400: Not replacing HelveticaNeueLTStd-Cn
(priority=21) by HelveticaNeueLTStd-BlkCn (priority=24)
Registering: HelveticaNeueLT Std Blk Cn,normal,400 under F18

By contrast, fontconfig identifies them as I'd expect:

$ fc-list | grep Neue
Helvetica Neue LT Std:style=55 Roman,Regular
Helvetica Neue LT Std,HelveticaNeueLT Std Cn:style=57 Condensed,Regular
Helvetica Neue LT Std,HelveticaNeueLT Std Blk Cn:style=97 Black
Condensed,Regular
Helvetica Neue LT Std,HelveticaNeueLT Std Cn:style=77 Bold Condensed,Bold

These were originally OpenType fonts with CFF outlines; they were converted to
TrueType using FontForge. They behave as expected with other tools including
FontConfig and can be used normally in apps.

As these are commercial fonts I can't attach them to this bug report directly,
but I can lend them to anyone who needs them for testing purposes *only*. You
know how it is with font foundries.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #8 from Glenn Adams <ga...@apache.org> ---
batch transition resolved+wontfix to closed+wontfix; if you believe this
remains a bug and can demonstrate it with appropriate input FO file and output
PDF file (as applicable), then you may reopen

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #2 from Craig Ringer <ri...@ringerc.id.au> 2011-12-06 07:30:39 UTC ---
It looks like the DejaVu fonts work better, but still not quite right:

15:09:30,926 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Sans,italic,700: Replacing DejaVu Sans Condensed Bold Oblique (priority=23) by
DejaVu Sans Bold Oblique (priority=13)
15:09:30,974 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Sans,normal,700: Not replacing DejaVu Sans Bold (priority=5) by DejaVu Sans
Condensed Bold (priority=15)
15:09:31,008 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Serif,italic,700: Replacing DejaVu Serif Condensed Bold Italic (priority=22) by
DejaVu Serif Bold Italic (priority=12)
15:09:31,041 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Serif,italic,400: Replacing DejaVu Serif Condensed Italic (priority=17) by
DejaVu Serif Italic (priority=7)
15:09:31,084 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Sans,italic,400: Not replacing DejaVu Sans Oblique (priority=8) by DejaVu Sans
Condensed Oblique (priority=18)
15:09:31,141 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Serif,normal,400: Replacing DejaVu Serif Condensed (priority=10) by DejaVu
Serif (priority=0)
15:09:31,192 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Sans,normal,400: Not replacing DejaVu Sans (priority=0) by DejaVu Sans
Condensed (priority=10)
15:09:31,237 FINE  [org.apache.fop.fonts.FontInfo] (pool-8-thread-1) DejaVu
Serif,normal,700: Not replacing DejaVu Serif Bold (priority=5) by DejaVu Serif
Condensed Bold (priority=15)

That said, the DejaVu fonts contain detailed face names, so fop registers them
with the full face name as an alternate family name, eg
DejaVuSerifCondensed-Bold is registered as
"DejaVuSerifCondensed-Bold,normal,400". This font can be selected by full name,
providing a workaround for the lack of font-stretch without requiring manual
registration of fonts. It's a bit of a hack and doesn't permit you to do things
like say "I want Helvetica Condensed" then apply selective bold/italic styling
and have the right face picked, though; you always have to specify the full
explicit font name.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #6 from Glenn Adams <gl...@skynav.com> 2012-04-09 18:58:23 UTC ---
not a bug; use font configuration features to select desired font

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #3 from Craig Ringer <ri...@ringerc.id.au> 2011-12-15 07:25:17 UTC ---
This looks like it might be partly by design.

It seems fop registers a font more than once. It'll register the "most
preferred" face for a family under the general family name, but it'll also
always register each exact face under:

  font-family="TheExactFaceName" font-style="normal" font-weight="normal"

so eg if you have MyriadPro-BlackIt.ttf (with the same face name as the file
name, sans extension) fop will register something like:

  font-family="MyriadPro" font-style="italic" font-weight="900"
  font-family="MyriadPro-BlackIt" font-style="normal" font-weight="normal"

I was only seeing the exact-face-name registrations, which are very confusing.

There is a legitimate bug here, in that fop will always prefer a non-condensed
face to a condensed face when registering for a (family,weight,slant) tuple, so
there's no way to select how condensed you want a font based on
(family,weight,slant,condensed), you have to specify the exact face name as
illustrated in bug #52290 . That's more of a feature request than a bug, though
- a way for fop to store and record information about how condensed a font is.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #7 from Glenn Adams <ga...@apache.org> ---
batch transition resolved+wontfix to closed+wontfix

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #1 from Craig Ringer <ri...@ringerc.id.au> 2011-12-06 03:44:28 UTC ---
See also https://issues.apache.org/bugzilla/show_bug.cgi?id=52290, which
relates to misclassification of some condensed faces. Since fop seems to be
having trouble detecting the font weights too, this might not really be
related, but it's worth seeing.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #4 from Craig Ringer <ri...@ringerc.id.au> 2011-12-15 07:26:33 UTC ---
Please flag as importance: enhancement

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

--- Comment #5 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:42:09 UTC ---
resetting P2 open bugs to P3 pending further review

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52289] Fop misclassifies condensed fonts as regular

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289

Craig Ringer <ri...@ringerc.id.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Condensed font selection    |Fop misclassifies condensed
                   |and identification          |fonts as regular

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.