you can in scintilla on windows 10 11 with
ScintillaSendMessage(0,#SCI_SETTECHNOLOGY, #SC_TECHNOLOGY_DIRECTWRITE)
Code: Select all
Procedure.s _Chr(v.i) ;return a proper surrogate pair for unicode values outside the BMP (Basic Multilingual Plane)
Protected chr.q
If v < $10000
ProcedureReturn Chr(v)
Else
chr = (v&$3FF)<<16 | (v-$10000)>>10 | $DC00D800
ProcedureReturn PeekS(@chr, 2, #PB_Unicode)
EndIf
EndProcedure
If OpenWindow(0, 0, 0, 600, 200, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(0, 10, 10, 580, 180, 0)
ScintillaSendMessage(0,#SCI_SETTECHNOLOGY, #SC_TECHNOLOGY_DIRECTWRITE) ;<---this does the job
; Output set to red color
ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
ScintillaSendMessage(Gadget, #SCI_STYLESETFONT,#STYLE_DEFAULT, @"Segoe UI")
ScintillaSendMessage(Gadget, #SCI_STYLESETSIZE, #STYLE_DEFAULT, 18)
; Set the initial text to the ScintillaGadget
*Text=UTF8("This is a simple ScintillaGadget with text..." + _Chr($1f60e))
ScintillaSendMessage(0, #SCI_SETTEXT, 0, *Text)
FreeMemory(*Text) ; The buffer made by UTF8() has to be freed, to avoid memory leak
; Adding a second line of text with linebreak before
Text$ = Chr(10) + "Second line"
*Text=UTF8(Text$)
ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), *Text)
FreeMemory(*Text)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf