On Windows, PureBasic seems to render text using ClearType, except in one case :

As you can see, when drawing text using DrawVectorParagraph, everything works as expected, but with DrawVectorText, colors are lost.
It might not seem all that important, but it's bad enough that a user with slight visual impairment can't use my software and asked if this was remediable.
Code for the comparison above :
Code: Select all
If OpenWindow(0, 0, 0, 400, 470, "Font rendering", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 470, #PB_Canvas_Container)
LoadFont(0, "Arial", 20, #PB_Font_HighQuality)
If StartVectorDrawing(CanvasVectorOutput(0))
VectorFont(FontID(0))
MovePathCursor(10, 9)
DrawVectorText(~"VectorText:\nThe quick brown fox\njumps over the lazy dog")
MovePathCursor(10, 120)
DrawVectorParagraph(~"VectorParagraph:\nThe quick brown fox\njumps over the lazy dog",400, 200)
StopVectorDrawing()
StartDrawing(CanvasOutput(0))
DrawingMode(#PB_2DDrawing_Transparent)
FrontColor($000000)
DrawingFont(FontID(0))
DrawText(10, 230, "RasterText:")
DrawText(10, 263, "The quick brown fox")
DrawText(10, 296, "jumps over the lazy dog")
StopDrawing()
TextGadget(1, 10, 345, 400, 200, ~"TextGadget:\nThe quick brown fox\njumps over the lazy dog")
SetGadgetColor(1, #PB_Gadget_BackColor, $FFFFFF)
SetGadgetColor(1, #PB_Gadget_FrontColor, $000000)
SetGadgetFont(1, FontID(0))
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf