WingDings font not displaying

Post bugreports for the Windows version here
User avatar
Blue
Addict
Addict
Posts: 970
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

WingDings font not displaying

Post 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
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
STARGÅTE
Addict
Addict
Posts: 2257
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: WingDings font not displaying

Post 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)
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
Blue
Addict
Addict
Posts: 970
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: WingDings font not displaying

Post 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.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Little John
Addict
Addict
Posts: 4801
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: WingDings font not displaying

Post 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.
Post Reply