DynaPDF - Problems with umlauts

Hi,
I’m using DynaPDF to create worksheets and I’m having troubles with umlauts, I always get the message “warning glyph not found”.
This is the code :

call pdf.SetFont "Consolas", pdf.kfsnone, 13.0, true, pdf.kcpUnicode

I need to use pdf.kcpUnicode because I’m also using text-tables (not drawn tables! so I need other sets of glyphs)
The problem is that for some reason umlauts are not recognized, but they are supported on Courier New or Consolas (I also need monospaced fonts).

What should I do ?
Thanks

are you sure your text has proper encoding set?

The text that is used is loaded from a text file with encoding.Utf8 so other than this I don’t know what else to do with the encodings

just double check in debugger that text has a known encoding and you use cpUnicode everywhere.
And of course a font which has the characters.

[quote=292775:@Christian Schmitz]just double check in debugger that text has a known encoding and you use cpUnicode everywhere.
And of course a font which has the characters.[/quote]
But Is there a way to Avoid that message?, I’m making a table in DynaPDf and says: WriteFText: Font: “Courier” 1 glyphs not found!

You can test the text to know what glyphs are not valid.
e.g. call TestGlyphs and if font doesn’t have them all, switch font.

GetMissingGlyphs function may tell you what’s missing.

DynaPDF doesn’t do any type of font fallback. The glyphs must exist in the font you have set.

What you will probably have to do is pre-process the string and build up a formatted string that can reference multiple fonts via the \FT tag.

Looking at the DynaPDF docs you would use TestGlyphs to check for the existence of each character in your string using your preferred font. If the character did not exist you would then need to look for the character in whatever fonts you decide to be your fallback fonts.

The easiest solution would be to use something like Arial Unicode MS as your fallback font as it covers lots of scripts. However, this could make some characters look out of place as Arial Unicode MS is quite different in appearance to Courier. EnumDocFonts provides information about the fonts so you might be able to use the flags (Fixed Pitch?) to help prioritise the order of your fallback fonts. Things get more complex when dealing with Asian text as some of their Unicode character ranges overlap and only differ in appearance (ie: the font chosen).

To see font fallback in action you can paste your text into a word processor, set the text font to Courier and look at the font that has been assigned to individual characters.

[quote=376360:@Kevin Gale]DynaPDF doesn’t do any type of font fallback. The glyphs must exist in the font you have set.

What you will probably have to do is pre-process the string and build up a formatted string that can reference multiple fonts via the \FT tag.

Looking at the DynaPDF docs you would use TestGlyphs to check for the existence of each character in your string using your preferred font. If the character did not exist you would then need to look for the character in whatever fonts you decide to be your fallback fonts.

The easiest solution would be to use something like Arial Unicode MS as your fallback font as it covers lots of scripts. However, this could make some characters look out of place as Arial Unicode MS is quite different in appearance to Courier. EnumDocFonts provides information about the fonts so you might be able to use the flags (Fixed Pitch?) to help prioritise the order of your fallback fonts. Things get more complex when dealing with Asian text as some of their Unicode character ranges overlap and only differ in appearance (ie: the font chosen).

To see font fallback in action you can paste your text into a word processor, set the text font to Courier and look at the font that has been assigned to individual characters.[/quote]

I found where is located the Issue, In one of the Rows of my dynaPDFTable I have a text that say that error about “Glyphs not found”
Even using Arial Unicode MS.

For the encoding of the text passed to the Row I’m using .DefineEncodings(Encodings.UTF8)

[quote=376378:@Gerardo García]I found where is located the Issue, In one of the Rows of my dynaPDFTable I have a text that say that error about “Glyphs not found”
Even using Arial Unicode MS.

For the encoding of the text passed to the Row I’m using .DefineEncodings(Encodings.UTF8)[/quote]
Doesn’t proccess Accents

Meanwhile thats the Way I solved: ReplaceAll("Á","Á")

That seems strange as Arial Unicode MS does contain those characters.

A test project by email showing the problem may help to investigate.