Pentaho Reporting and Pentaho Report Designer
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-2145

Doesn't Work: Allow to define extra font paths to register via the configuration

    Details

    • Customer Case:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • QA Validation Status:
      Validated by QA

      Description

      This comes in handy to make the engine run in non-standard environments.
      1. libfont.properties
        0.1 kB
        Kurtis Cruzada
      1. screenshot-1.jpg
        46 kB

        Activity

        Hide
        Thomas Morgner added a comment -
        The prefix "org.pentaho.reporting.libraries.fonts.extra-font-dirs." is now recognized in the libfonts configuration. Each entry is interpreted as a directory path that contains the font files.
        Show
        Thomas Morgner added a comment - The prefix "org.pentaho.reporting.libraries.fonts.extra-font-dirs." is now recognized in the libfonts configuration. Each entry is interpreted as a directory path that contains the font files.
        Hide
        Gretchen Moran added a comment -
        In attempting to use the extra-font-dirs property, I noticed while stepping through the code in AbstractFontFileRegistry (on or about line 66) that the "extraDir" property that is used to find the Directory in which to look for extra fonts is actually using the key of the property from the property file
        instead of the value. Since the key is not a directory, nor can I imagine it would ever be one, the fonts are not found. Here is what my
        property looks like:

        org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=E:/downloads/fonts/chowfun_.ttf

        I have placed this property in a libfont.properties file in my pentaho/WEB-INF/classes directory.
        Show
        Gretchen Moran added a comment - In attempting to use the extra-font-dirs property, I noticed while stepping through the code in AbstractFontFileRegistry (on or about line 66) that the "extraDir" property that is used to find the Directory in which to look for extra fonts is actually using the key of the property from the property file instead of the value. Since the key is not a directory, nor can I imagine it would ever be one, the fonts are not found. Here is what my property looks like: org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=E:/downloads/fonts/chowfun_.ttf I have placed this property in a libfont.properties file in my pentaho/WEB-INF/classes directory.
        Hide
        Gretchen Moran added a comment -
        Re-opening as bug, as this property doesn't work.
        Show
        Gretchen Moran added a comment - Re-opening as bug, as this property doesn't work.
        Hide
        Thomas Morgner added a comment -
        Fixed.
        Show
        Thomas Morgner added a comment - Fixed.
        Hide
        Ezequiel Cuellar added a comment -
        Was unable to register the font on PRD.

        I created a "libfont.properties" file and dropped it in to the "resources" folder in PRD.
        The "libfont.properties" defines the following property

        org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=/home/e-cuellar/CHOWFUN_.TTF (As it says I have the CHOWFUN_.TTF on my home folder)

        I started PRD and I do not see the Chowfun in the fonts list.

        I also attempted modifying the "libfont.properties" inside the libfonts jar file and did not work either.
        Show
        Ezequiel Cuellar added a comment - Was unable to register the font on PRD. I created a "libfont.properties" file and dropped it in to the "resources" folder in PRD. The "libfont.properties" defines the following property org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=/home/e-cuellar/CHOWFUN_.TTF (As it says I have the CHOWFUN_.TTF on my home folder) I started PRD and I do not see the Chowfun in the fonts list. I also attempted modifying the "libfont.properties" inside the libfonts jar file and did not work either.
        Hide
        Ezequiel Cuellar added a comment -
        Advice from Thomas

        Fonts registered that way will only be usable for PDF export.
        If you want to have the font usable everywhere, you have to
        place it into either your operating system's font directory
        or into $JRE/lib/fonts
        Show
        Ezequiel Cuellar added a comment - Advice from Thomas Fonts registered that way will only be usable for PDF export. If you want to have the font usable everywhere, you have to place it into either your operating system's font directory or into $JRE/lib/fonts
        Hide
        Kurtis Cruzada added a comment - - edited
        This is working... Here is my validation steps.

        1. Attached is the chowfun.zip (chowfun_.ttf)
        2. Attached is the chowfun.prpt
        3. Attached is my libfont.properties file. I placed this in my /pentaho/WEB-INF/classes folder. I used the following entry:

        org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=/Users/kcruzada/Downloads/chow_fun

        4. View as PDF. see screenshot.
        Show
        Kurtis Cruzada added a comment - - edited This is working... Here is my validation steps. 1. Attached is the chowfun.zip (chowfun_.ttf) 2. Attached is the chowfun.prpt 3. Attached is my libfont.properties file. I placed this in my /pentaho/WEB-INF/classes folder. I used the following entry: org.pentaho.reporting.libraries.fonts.extra-font-dirs.mydir=/Users/kcruzada/Downloads/chow_fun 4. View as PDF. see screenshot.

          People

          • Assignee:
            Kurtis Cruzada
            Reporter:
            Thomas Morgner
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: