Page 1 of 1

WingDings font not displaying

Posted: Sun Oct 19, 2025 9:45 pm
by Blue
Not sure if this a Windows problem
or a PB problem.

  Windows X64 24H2 build 26120.6972
             PB 6.21 x64

The following minimal code used to work some months ago,
but no longer does.
I suspect it's a Windows problem, rather than a PB one.
I still mention it here, just in case...

Code: Select all

; Wingdings Font not displaying
; a Windows problem or a PB problem ?

EnableExplicit

Define font_wd = LoadFont(0, "WingDings", 16, #PB_Font_Bold)
Define font_se = LoadFont(1, "Segoe UI", 8)

Define txt$ = "1 élève "

OpenWindow(0,0,0,400,200,"WINGDINGS Font",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)

Define gi, gY, gH
gY = 10
gH = 25

gi = 0   ; gadget number
  ButtonGadget(gi,10,gY,120,gH,txt$ + gi)
  SetGadgetFont(gi,font_se)             ; works as expected
gi + 1
  gY + gH
  ButtonGadget(gi,10,gY,120,gH,txt$ + gi)
  SetGadgetFont(gi,font_wd)             ; does not work  
  
gi + 1
  gY + gH
  TextGadget(gi,10,gY,120,gH,txt$ + gi)
  SetGadgetFont(gi,font_se)             ; works as expected
gi + 1
  gY + gH
  TextGadget(gi,10,gY,120,gH,txt$ + gi)
  SetGadgetFont(gi,font_wd)             ; does not work  

While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
Image

Re: WingDings font not displaying

Posted: Sun Oct 19, 2025 9:51 pm
by STARGÅTE
The text gadget is too small in width and the Text gadget makes a word wrap:

Code: Select all

TextGadget(gi,10,gY,120,gH+30,txt$ + gi)

Re: WingDings font not displaying

Posted: Mon Oct 20, 2025 6:49 am
by Blue
STARGÅTE wrote: Sun Oct 19, 2025 9:51 pm The text gadget is too small in width and the Text gadget makes a word wrap:

Code: Select all

TextGadget(gi,10,gY,120,gH+30,txt$ + gi)
No.
The text (“1 élève” plus a 1 digit number), will fit easily in the allotted width.

You're confusing the text in the code with the content of the picture that follows the code, which was added only to show how the text is expected to look in WingDings.

Granted though, that picture is squished. Click on it, and you should see it correctly.

Re: WingDings font not displaying

Posted: Mon Oct 20, 2025 11:00 am
by Little John
The WingDings font used in the demo code is too big (or the used gadgets are too small).

Code: Select all

; PB 6.30 beta 3 (x64) on Windows 11 Pro (version 24H2, last update 2025 Oct. 15)

EnableExplicit

Define txt$ = "1 élève "
Define.i gi, gY, gH = 25
Define.i font_wd = LoadFont(0, "WingDings", 8)
Define.i font_se = LoadFont(1, "Segoe UI",  8)

OpenWindow(0, 0,0, 400,200, "WingDings font", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)

gi = 0                                       ; gadget number
gY = 10
ButtonGadget (gi, 10,gY, 120,gH, txt$ + gi)
SetGadgetFont(gi, font_se)                   ; Segoe UI, works as expected

gi + 1
gY + gH
ButtonGadget (gi, 10,gY, 120,gH, txt$ + gi)
SetGadgetFont(gi, font_wd)                   ; WingDings, works as expected

gi + 1
gY + gH
TextGadget   (gi, 10,gY, 120,gH, txt$ + gi)
SetGadgetFont(gi, font_se)                   ; Segoe UI, works as expected

gi + 1
gY + gH
TextGadget   (gi, 10,gY, 120,gH, txt$ + gi)
SetGadgetFont(gi, font_wd)                   ; WingDings, works as expected

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Image
 
Looks OK to me.

//edit: Same result here with PB 6.21 (x64).