I want to use the open-source font from the link below for the label controls in my dialog box.
https://github.com/adobe-fonts/source-sa...egular.ttf
I have created the following QM code, but it's not working.
The method used in the following code is a bit clumsy. I don't want to install the font in the system folder, I just want to use it temporarily. There should be a more suitable method.
How achieve the above functionality in QM and LA? Does anyone have sample code to provide?
Thanks in advance.
David
Macro setF
https://github.com/adobe-fonts/source-sa...egular.ttf
I have created the following QM code, but it's not working.
The method used in the following code is a bit clumsy. I don't want to install the font in the system folder, I just want to use it temporarily. There should be a more suitable method.
How achieve the above functionality in QM and LA? Does anyone have sample code to provide?
Thanks in advance.
David
Macro setF
str ttf="$My QM$\SourceSans3-Regular.ttf"
if(!FileExists("$fonts$\SourceSans3-Regular.ttf"))
,cop ttf "$fonts$"
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Static 0x54000000 0x0 60 40 48 12 "Text"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc v
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,__Font-- f.Create(ttf); f.SetDialogFont(hDlg "3")
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1