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:35:43 UTC

DO NOT REPLY [Bug 52290] New: Fop offers no way to select between condensed and non-condensed font variants

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

             Bug #: 52290
           Summary: Fop offers no way to select between condensed and
                    non-condensed font variants
           Product: Fop
           Version: 1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fonts
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: ringerc@ringerc.id.au
    Classification: Unclassified


If one has a collection of faces for a font, some of which are condensed and
some which are not, fop doesn't offer any way to select between them.

According to the XSL-FO standard it appears that the "font-stretch" property
should be used to pick between condensed/expanded/regular faces of a font.
font-stretch is documented as unimplemented in fop. The only questions about on
the mailing list have referred to using font-stretch to artificially condense
or expand a regular face, which is *not* what I need to do, and an idea that
was rejected anyway.

It looks like Fop stores font info as (family, style, weight) triplets, where
"style" here refers to oblique/regular. It doesn't seem to have to track any
additional style attributes like small-caps or whether the face is a condensed
or expanded face.

To support font-stretch, fop will need to:

- Identify whether a font face is condensed/expanded/regular when examining it
- Track additional font metadata, not just the basic font-triplet, treating 
  condensed and non-condensed faces as different fonts.
- Consider the value of font-stretch when matching fonts.

There are some free condensed fonts, including http://dejavu-fonts.org/ which
has a variety of condensed faces, so this isn't something that requires
commercial fonts (though it'll be mostly useful with them).

-- 
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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #8 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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #6 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:42:40 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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #2 from Craig Ringer <ri...@ringerc.id.au> 2011-12-06 03:40:58 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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #1 from Craig Ringer <ri...@ringerc.id.au> 2011-12-06 03:37:55 UTC ---
It appears that the issue can be worked around - albeit clumsily - by
registering each font manually in the config file, specifying a different
family name for condensed and non-condensed variants. I can then select the
condensed face by asking for "Helvetica Neue LT Condensed" as the family. It's
clunky and clumsy to set up, but it does work. See the generated config file
snippet below for an example.

Here's the config file snippet I'm using to get my fonts to work in the mean
time. In reality there are plenty more fonts, but here's how it works:

      <fonts>
        <font
embed-url="file:/opt/jboss/classads/fonts/HelveticaNeueLTStd-Roman.ttf">
          <font-triplet name="Helvetica Neue LT" style="normal" weight="400"/>
        </font>
        <font
embed-url="file:/opt/jboss/classads/fonts/HelveticaNeueLTStd-Cn.ttf">
          <font-triplet name="Helvetica Neue LT Condensed" style="normal"
weight="400"/>
        </font>
        <font
embed-url="file:/opt/jboss/classads/fonts/HelveticaNeueLTStd-BdCn.ttf">
          <font-triplet name="Helvetica Neue LT Condensed" style="normal"
weight="700"/>
        </font>
        <font
embed-url="file:/opt/jboss/classads/fonts/HelveticaNeueLTStd-BlkCn.ttf">
          <font-triplet name="Helvetica Neue LT Condensed" style="normal"
weight="900"/>
        </font>
      </fonts>

-- 
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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #4 from Craig Ringer <ri...@ringerc.id.au> 2011-12-15 07:20:48 UTC ---
It turns out that the manual font definitions are not required. A regular
directory scan for fonts will add the fully qualified face name as a fake
family automatically, so if you have the font:

  MyriadPro-BlackCondIt.ttf

then presuming the file name is the same as the internal full face name, you
can reference it in fop with:

  font-family="MyriadPro-BlackCondIt" font-weight="normal" font-style="normal"

Note the use of "normal" weight and slant, even though this is a black
condensed oblique face. Fop appears to always register these fully-qualified
font faces as normal/normal, so if you want to specify an exact face you need
to give a normal weight and slant.

This is really only a workaround for the inability to properly use
font-stretch, however it'll be useful for people who have small-capitals or
other specialized font faces they want to be able to explicitly name.

If you're not sure what fop expects your font to be called, turn on trace
logging in fop and search the log for "registering" (case insensitive) to find
font names.

-- 
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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

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

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

--- Comment #7 from Glenn Adams <gl...@skynav.com> 2012-04-07 09:49:13 UTC ---
use explicit font configuration to specify distinct font family names; if a
patch is provided that supports a more general solution, then it will be
considered for application;

-- 
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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

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

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

--- Comment #9 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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #3 from Craig Ringer <ri...@ringerc.id.au> 2011-12-06 03:45:14 UTC ---
Whoops, that should've been
https://issues.apache.org/bugzilla/show_bug.cgi?id=52289, re the inability to
select between condensed and non-condensed faces.

-- 
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 52290] Fop offers no way to select between condensed and non-condensed font variants

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

--- Comment #5 from Craig Ringer <ri...@ringerc.id.au> 2011-12-15 07:25:44 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.