Why are so many fonts so generic looking when drawing to a canvas?

I am running into a new issue where so many fonts from my font menu appear generic when I am drawing them to the canvas. I am using .SetFont like I have been for years, but has Xojo changed anything in the latest IDEs?

Example of your code?
Platform?

and what exactly is “SETFONT”?

normally you would say something like

myTextfield.font="Courier"

And also… there was a change (Apples doing, not Xojo) where only the “Font Family” is exposed…
so if the “name” you provide is not recoginized… it will default to some other font… THAT might be what you are seeing

Base font (“Courier”) or variant (Italic, Bold, etc.) ?

How do I force the font list to produce only compatible fonts to avoid this issue?

The method at http://documentation.xojo.com/index.php/Font does return all valid fonts. In Windows, that is really all the fonts with their stylistic variations (bold, italic, bolditalic, underlined, and so on).

On Mac the same method shows the font families, but not the stylistic variations. That would require a declare or a plugin. But all the fonts obtained are valid.

  1. Which platform are you using ?

  2. Could you post your code ?

  3. What is this “.setfont” method you are referring to ? Is it a method of yours ? If so, can you post the code ?

[quote=382755:@Michel Bujardet]The method at http://documentation.xojo.com/index.php/Font does return all valid fonts. In Windows, that is really all the fonts with their stylistic variations (bold, italic, bolditalic, underlined, and so on).

On Mac the same method shows the font families, but not the stylistic variations. That would require a declare or a plugin. But all the fonts obtained are valid.[/quote]
That’s a good point, however remember that there are fonts included with macOS which seem to render generically on a computer with a European language because all of their characters are Unicode. Like Kanji for example.

So yes, it would be helpful to know which fonts you are trying to use.

Sorry, I should have been more specific. I know I can generate a valid list using the code example from the language reference, but I am actually working with PostScript font names. If I use FamilyName I won’t be able to pass off (easily) the correct PostScript name for another aspect of my app.

You know, if you want to obtain valid answers, it is much better to give all the context.

[quote=382755:@Michel Bujardet]1. Which platform are you using ?

  1. Could you post your code ?

  2. What is this “.setfont” method you are referring to ? Is it a method of yours ? If so, can you post the code ?[/quote]

If you don’t care to provide valid information, you will get the wrong replies.

Garbage in, garbage out. Old programming proverb.

InCanvas1.Paint Event:

[code]g.TextFont = “Courier”
g.DrawString “Courier”,10,10

g.TextFont = “Courier Bold”
g.DrawString “Courier Bold”,10,30

g.TextFont = “Courier-Bold”
g.DrawString “Courier-Bold”,10,50

g.TextFont = “CourierBold” // Not displayed with Bold…
g.DrawString “CourierBold”,10,70[/code]

Only the last is wrong: CourierBold. With a space or with a ‘-’ print the text in Bold.

What are-you using ?

Tooks more time to run Xojo 2017r3 than to write it.

That means Courier-Bold, isn’t it ?

Nota: I do not understand what Postscript comes to Xojo’s Canvas…

EIther the OP found a solution (understand his prolem) or give away that feature