HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues Unicode character not displayed, character missing in font

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27211

    When I print the following html, the not working square is shown as a question mark on an old version off pd4ml, and shown as blank in the latest 3.109 version of pd4ml.
    The character that is working is the: #9633 (White Square http://www.codetable.net/decimal/9633)
    The character that isn’t working is the: #9723 ( White Medium Square http://www.codetable.net/decimal/9723)

    I found that the 9723 isn’t supported by Verdana, but is shown in Browsers.
    Shouldn’t it fallback to a font that does support the character ?

    Working: □
    Not working: ◻
    #30198

    I reviewed a number of TTFs with “Character Map” Windows utility, and it seems #9723 (U+25FB) glyph is quite rare in TTFs. I have only found it in DejaVu family of fonts.

    So try to modify the font-family directive like that:
    from
    “font-family=Verdana,Geneva,Arial,Helvetica,sans-serif”
    to
    “font-family: Verdana,Geneva,’DejaVu Sans’,Arial,Helvetica,sans-serif”

    (Make sure DejaVu font is installed and indexed, and do not forget to substitute ‘=’ with ‘:’ in the property definition)

    #30199

    @PD4ML wrote:

    I reviewed a number of TTFs with “Character Map” Windows utility, and it seems #9723 (U+25FB) glyph is quite rare in TTFs. I have only found it in DejaVu family of fonts.

    So try to modify the font-family directive like that:
    from
    “font-family=Verdana,Geneva,Arial,Helvetica,sans-serif”
    to
    “font-family: Verdana,Geneva,’DejaVu Sans’,Arial,Helvetica,sans-serif”

    (Make sure DejaVu font is installed and indexed, and do not forget to substitute ‘=’ with ‘:’ in the property definition)

    Thanks, my bad for using a = instead of a :.

    I’am using the pd4fonts.properties file for loading all the fonts in the windows/fonts directory, but now I want to load this extra font DejaVu Sans from a different directory. We install our program by scripts and installing a font in windows could be a hassle especially if it would require admin-right to modify the fonts in windows.
    So do you perhaps got some tips for configuring a extra font in our own folder, or an easy way to install the script in Windows.

    As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.

    Regards,
    Jeroen

    #30200

    @JeroenInception wrote:

    @PD4ML wrote:

    I reviewed a number of TTFs with “Character Map” Windows utility, and it seems #9723 (U+25FB) glyph is quite rare in TTFs. I have only found it in DejaVu family of fonts.

    So try to modify the font-family directive like that:
    from
    “font-family=Verdana,Geneva,Arial,Helvetica,sans-serif”
    to
    “font-family: Verdana,Geneva,’DejaVu Sans’,Arial,Helvetica,sans-serif”

    (Make sure DejaVu font is installed and indexed, and do not forget to substitute ‘=’ with ‘:’ in the property definition)

    Thanks, my bad for using a = instead of a :.

    I’am using the pd4fonts.properties file for loading all the fonts in the windows/fonts directory, but now I want to load this extra font DejaVu Sans from a different directory. We install our program by scripts and installing a font in windows could be a hassle especially if it would require admin-right to modify the fonts in windows.
    So do you perhaps got some tips for configuring a extra font in our own folder, or an easy way to install the script in Windows.

    As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.

    Regards,
    Jeroen

    After testing installing the font in Windows isn’t an options for us.
    Is there another font/solution we can use that’s standard available on a Windows Server.

    #30196

    @JeroenInception wrote:

    @JeroenInception wrote:

    @PD4ML wrote:

    I reviewed a number of TTFs with “Character Map” Windows utility, and it seems #9723 (U+25FB) glyph is quite rare in TTFs. I have only found it in DejaVu family of fonts.

    So try to modify the font-family directive like that:
    from
    “font-family=Verdana,Geneva,Arial,Helvetica,sans-serif”
    to
    “font-family: Verdana,Geneva,’DejaVu Sans’,Arial,Helvetica,sans-serif”

    (Make sure DejaVu font is installed and indexed, and do not forget to substitute ‘=’ with ‘:’ in the property definition)

    Thanks, my bad for using a = instead of a :.

    I’am using the pd4fonts.properties file for loading all the fonts in the windows/fonts directory, but now I want to load this extra font DejaVu Sans from a different directory. We install our program by scripts and installing a font in windows could be a hassle especially if it would require admin-right to modify the fonts in windows.
    So do you perhaps got some tips for configuring a extra font in our own folder, or an easy way to install the script in Windows.

    As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.

    Regards,
    Jeroen

    After testing installing the font in Windows isn’t an options for us.
    Is there another font/solution we can use that’s standard available on a Windows Server.

    Excellent topic. Thank you.

    #30197

    As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.

    The browsers are native application, which have access to all available fonts. Java as a rule has only “proxied” access to the fonts via java.awt.Font object. The object has a lot of useful features, but it does not provide an access to the TTF file itself (we need a physical access to the file tp parse it and partially embed to PDF) – that is why that confusing pd4fonts.properties indexing is needed.

    Well – Java can “guess” that the TTFs are in c:/windows/fonts, but there are a lot of fonts there and parsing of all of them to find the one, which has a desired glyph is a resource and time consuming task.

    A native application has all the needed info easily available and a font substitution tables are tuned for the platform and available fonts. In Java case we need to come up with a general platform independent solution…

    Regarding the original issue: go through the list of available fonts on Win server and check which one contains the glyph – I did so with the standard Character Map application. There are some “glyph-reference” pages in the Internet – probably they refer to popular TTFs, that implement the glyph. After the font is found, explicitly refer it from your HTML/CSS (and make sure it is mapped in pd4fonts.properties). We’ll look for the font also on our side by an opportunity.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.