Code: Select all
If OpenWindow(0, 0, 0, 800, 470, "#PB_Font_HighQuality", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 800, 470, #PB_Canvas_Container)
LoadFont(0, "Arial", 20, #PB_Font_HighQuality)
LoadFont(1, "Arial", 20)
If StartVectorDrawing(CanvasVectorOutput(0))
VectorFont(FontID(0))
MovePathCursor(10, 9)
DrawVectorText(~"HighQuality VectorText:\nThe quick brown fox\njumps over the lazy dog")
MovePathCursor(10, 120)
DrawVectorParagraph(~"HighQuality VectorParagraph:\nThe quick brown fox\njumps over the lazy dog",400, 200)
VectorFont(FontID(1))
MovePathCursor(410, 9)
DrawVectorText( ~"LowQuality VectorText:\nThe quick brown fox\njumps over the lazy dog")
MovePathCursor(410, 120)
DrawVectorParagraph( ~"LowQuality 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, "HighQuality RasterText:")
DrawText(10, 263, "The quick brown fox")
DrawText(10, 296, "jumps over the lazy dog")
DrawingFont(FontID(1))
DrawText(410, 230, "LowQuality RasterText:")
DrawText(410, 263, "The quick brown fox")
DrawText(410, 296, "jumps over the lazy dog")
StopDrawing()
TextGadget(1, 10, 345, 400, 200, ~"HighQuality 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))
TextGadget(2, 410, 345, 400, 200, ~"LowQuality TextGadget:\nThe quick brown fox\njumps over the lazy dog")
SetGadgetColor(2, #PB_Gadget_BackColor, $FFFFFF)
SetGadgetColor(2, #PB_Gadget_FrontColor, $000000)
SetGadgetFont(2, FontID(1))
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
But most importantly, why is DrawVectorText() the only one which is not rendered using ClearType on Windows? The glaring difference is what started me to look into this.