Author Topic: Any way to change built-in font ?  (Read 266 times)

0 Members and 1 Guest are viewing this topic.

Offline mohai

  • Newbie
  • Posts: 12
Any way to change built-in font ?
« on: December 24, 2021, 07:47:27 am »
Hello all,

Is there any way to change built-in font or change to a distributable one?
I mean, if I change the font in a form or some controls, I can only choose between buitl-in VGA font or the fonts installed in my Windows but, in different OS or different Windows versions, that font could not be available. So, labels and other texts will show different or even will show cut.

So, Is there any way to change or tweak InForm to include a different font into the EXE file, or to use an external font, such as NotoMono-Regular.ttf, even if it is not installed in your system?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3786
    • Steve’s QB64 Archive Forum
Re: Any way to change built-in font ?
« Reply #1 on: December 24, 2021, 07:56:37 am »
Easiest way is to just copy that font and include it with your project as a resource file.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 3165
  • Let it go, this too shall pass.
    • QB64.org
Re: Any way to change built-in font ?
« Reply #2 on: December 24, 2021, 08:36:27 am »
In the form designer, if you click the label that says "Font:" to the left of the font list, the list will turn into a text field where you can manually enter a font file name.

Offline mohai

  • Newbie
  • Posts: 12
Re: Any way to change built-in font ?
« Reply #3 on: December 27, 2021, 02:25:35 pm »
In the form designer, if you click the label that says "Font:" to the left of the font list, the list will turn into a text field where you can manually enter a font file name.
Thank you for the answers.

It works but, some care must be taken:

 - The font file must be in the same folder as UiEditor.exe (or must be installed in Windows system), so Inform will find it at edit time.
 - The font file must be in the same folder as the .EXE from your project. If not, default VGA font will be used instead.




Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 3165
  • Let it go, this too shall pass.
    • QB64.org
Re: Any way to change built-in font ?
« Reply #4 on: December 27, 2021, 02:34:25 pm »
Precisely.