Anyone got ANY idea wtf is going on

has ANYONE got any idea WTF is going on with some “fonts” on Windows like Roman ?
I can use that font name in a text area and it lookes fine
trying to draw with that font in a graphics context (like a canvas paint event) has no effect



the canvas (lower) literally just uses what ever text font the text area is set to - same size etc
and it works for some fonts - not others

Could it be a difference between truetype, opentype, etc? Maybe some formats work and some don’t? I have no idea WHY, but maybe that’s why some do and some don’t?

Yep - some of it has to do with raster fonts
Others that display such issues are OpenType which makes no sense to me

Yes - I get that it IS a problem
No idea why
I suspect it has to do with some stuff done using Direct2D, DirectDraw, and whatever other api’s

Was hoping someone right have som insight into why

However its now my problem and I think I need to come up with an “fonts” module that works x-platform and returns actual Font objects where I can filter out such anomalies since that doesnt exist in Xojo
Nor in any plugin I can see
But I haven’t looked to hard at plugins yet

ARG !!!

I know on the Mac, there are some fonts that Xojo won’t use and I had to use a NSAttribytedString to display the font.

I do wonder if Xojo does kind of “checking”.

I’ll say this as politely as I can

I get you dont like Xojo
I dont have a choice here whether I use it for this client or not

BUT, in a post SPECIFICALLY about Xojo and whether anyone has any idea whyXOJO doesnt seem to do the right thing repeated replies about Java Java Java are OFF TOPIC

Please refrain or offer some insight into what is going on with Xojo


rough guess: “Roman” is a historic Pixel-Font from Windows3 and not a Truetype. In your screenshot the caption looks somehow like Verdana or Tahoma and not Roman while the textfield is in Roman. Try to use “New Times Roman” instead.

well said.
this forum could be more interesting without endless off-topic.
but some people pretend not to understand.

My point is that the font list I get from Xojo’s font functions, and those names, is all I’m using to select what font is used

I’ll need to see if I can combine that with information from the MBS plugin for fonts and come up with a filtered list of some type that will work in both the text area and the canvas

ugh !

1 Like

Try the list font of any other windows program, none of them will list those fonts. Looks like another half baked functionality, get the list but dont filter the fonts that can be actually used…

Maybe you can list the fonts from another source, The windows API or even just the the registry avoiding the .FON ones:

The difference is that Textarea will use GDI Rendering Mode, whereas the Canvas (by default) will use Direct2D Rendering Mode.

More Details here:

HowTo: use Text Rendering using GDI and/or Direct2D in Xojo 2018r3

What happens if you draw to a non alpha-supported Picture New Picture(1,1,32) (which uses GDI-compatible text renderer), then draw this Picture in the Canvas?

It is interesting to note that Windows Font Viewer has the same problem:

I think working around bitmap fonts is probably going to be necessary.


Actually some DO - WordPad for instance lists Roman Script Terminal and others as well
And those WORK ok in a xojo textarea - not in a canvas
And thats the issue
I need to find the list that works in both - somehow

Hmmmmmm … not my favourite workaround bit I’ll have to give that a sot as a workaround
Still … YUK !

that was the second part of the answer

just enumerating the fonts doesnt get me there though

I actually need to some how ask the Windows API “does this font work in GDI/GDI+ AND Direct2D or Direct Draw” or whatever its called now that is “the other API”

Jurgs hint might be the only way I can make sure I use a single rendering engine
Thats great
but it still doesnt tell me which fonts work with that engine

that might need declares

in part this is MS fault for having 2 or 3 apis that all kind of do the same thing in different ways
and then they’re all mixed up in Xojo’s framework so we end up with these kinds of mixed results

arg !

If you use the API, you get the font type directly, if you use the registry, you get the file name and from that you can look the file extension:

but that DOESNT solve the problem
it doesnt tell me which WILL work with both GDI and Direct2D or whatever
I’ve already tried this
Skipping raster fonts is part of it
And that alleviates some of the issues
but not all of them

Just looked into your question, and it appears that ‘Roman’ doesn’t exist on Windows, and ‘Times New Roman’ does exist. I looked up the font names on Microsoft Word for a list of installed fonts. When I change the text in a canvas and label, here is what I see on Windows 11, Xojo 2023 r 1.1.

1 Like

Not being listed on an app is not the same as not existing on the OS

Hi Ivan,

Yes, you are correct. I searched in Control Panel, Dialog Box, and viewed installed fonts on the OS. Here is a partial screen grab of installed fonts on Microsoft Windows 11 OS.

Roman definitely exists on Windows 10
I see it in the installed fonts dir
And it shows in Worded as well (microscopically)

The list in my screen shot is the names of the fonts that Xojo returns which seems to be every font
But since you JUST get “a name” you have no way to do anything like filter out raster fonts etc
There is no way to ask “will this font work in a canvas?” or “will it work in a text area?”

That is, in part, my conundrum
Jurg might have hit on a way to at least make it look better
It just means that now my set up I need to buffer through a picture … blech !