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
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
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.
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 !
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.
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 !