Fop
  1. Fop
  2. FOP-2010

[PATCH] Suppress unnecessary "font not found warnings" when generating AFP with raster fonts

    Details

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

      Description

      When generating AFP with raster fonts, and due to some rounding errors that happen during scaling, one may get font not found warnings in cases that are not warranted. Example: source specifies font size 10, which due to rounding errors is scaled to size 9.995, such font size does not exist and the warning message of the type "font X with size 9.995pt not found, replaced by size 10.0pt" is output. The patch suppresses the warning message if the difference in font sizes between what is searched and what is found is less than 0.1.

      1. test.fo
        1 kB
        Luis Bernardo
      2. afp_raster_font_warning.patch
        3 kB
        Luis Bernardo

        Activity

        Hide
        Luis Bernardo added a comment -

        Attachment afp_raster_font_warning.patch has been added with description: patch for org.apache.fop.afp.fonts.RasterFont.java

        Show
        Luis Bernardo added a comment - Attachment afp_raster_font_warning.patch has been added with description: patch for org.apache.fop.afp.fonts.RasterFont.java
        Hide
        Chris Bowditch added a comment -

        Hi Luis,

        Thanks for submitting the patch. Can you attach a test FO to demo the issue?

        Thanks,

        Chris

        Show
        Chris Bowditch added a comment - Hi Luis, Thanks for submitting the patch. Can you attach a test FO to demo the issue? Thanks, Chris
        Hide
        Luis Bernardo added a comment -

        This is the warning that is suppressed by the patch:

        18-Jan-2012 15:47:00 org.apache.fop.afp.fonts.RasterFont getCharacterSet
        WARNING: No 10.001pt font Helvetica found, substituted with 10.0pt font

        Show
        Luis Bernardo added a comment - This is the warning that is suppressed by the patch: 18-Jan-2012 15:47:00 org.apache.fop.afp.fonts.RasterFont getCharacterSet WARNING: No 10.001pt font Helvetica found, substituted with 10.0pt font
        Hide
        Luis Bernardo added a comment -

        Attachment test.fo has been added with description: example fo file that shows the issue

        Show
        Luis Bernardo added a comment - Attachment test.fo has been added with description: example fo file that shows the issue
        Hide
        Chris Bowditch added a comment -

        Hi Luis,

        Thanks for the patch and testcase. This has been applied in revision 1233393.

        Thanks,

        Chris

        Show
        Chris Bowditch added a comment - Hi Luis, Thanks for the patch and testcase. This has been applied in revision 1233393. Thanks, Chris
        Hide
        Glenn Adams added a comment -

        batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so

        Show
        Glenn Adams added a comment - batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development