FOP
  1. FOP
  2. FOP-1496

Multiple font family names, fallback fonts and font styles

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: font/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      44451

      Description

      The attached patch fixes two problems:

      • If distinct fonts declare the same font family name, the resulting font
        mapping is currently arbitrary; now, a name-similarity heuristic is used to
        prioritize the font mappings.
      • "Medium" and "demi" fonts are now recognized as "bold", solving several
        real-world problems (although this solution may be an oversimplification).
      1. fonts.diff
        9 kB
        Justus Piater

        Activity

        Hide
        Justus Piater added a comment -

        Attachment fonts.diff has been added with description: Patch as described in the bug report.

        Show
        Justus Piater added a comment - Attachment fonts.diff has been added with description: Patch as described in the bug report.
        Hide
        Jeremias Maerki added a comment -

        Patch applied with small modifications (under section 5 of the ALv2):
        http://svn.apache.org/viewvc?rev=629093&view=rev

        Thanks a lot, Justus!

        Details on my refinements for font-weight:
        I have fonts with medium, bold and extra bold weights. Setting medium and bold
        to the same weight value seemed to simple. So at the moment, the mapping looks
        like this:
        light -> 200
        default -> 400
        medium -> 500
        demi/semi(-bold) -> 600
        bold -> 700
        extrabold, extra bold, black, heavy, ultra, super -> 800
        (the extra bold weights should probably be refined further although there's not
        much playroom anymore.)

        Show
        Jeremias Maerki added a comment - Patch applied with small modifications (under section 5 of the ALv2): http://svn.apache.org/viewvc?rev=629093&view=rev Thanks a lot, Justus! Details on my refinements for font-weight: I have fonts with medium, bold and extra bold weights. Setting medium and bold to the same weight value seemed to simple. So at the moment, the mapping looks like this: light -> 200 default -> 400 medium -> 500 demi/semi(-bold) -> 600 bold -> 700 extrabold, extra bold, black, heavy, ultra, super -> 800 (the extra bold weights should probably be refined further although there's not much playroom anymore.)
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Justus Piater
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development