Fonts
#1
I recall there was a thread on how to add different Fonts to your program but I can't seem to find it. Perhaps it was on the deceased forum??? Does anyone know where I might find it again? 

Also, the thought comes to mind, would it be useful to have an option for different fonts in the IDE menu TOOLS. I have no clue how difficult that maybe or even if it would get much use.

In terms of using fonts in your program, it's one thing to display a font on the screen, and I assume, a completely different thing to have a particular font print on a printer? Or am I out to lunch on that comment  ie a screen dump using LPrint picks up whatever font is displayed.
Reply
#2
Using fonts is as simple as making use of _LOADFONT and then _FONT.

The IDE has the option to change fonts listed under the Display Options already, if you want to change the IDE's fonts.

For a quick demo of how to use some fonts, take a look up at my current Work in Progress post. It uses an array of fonts which you can then change through with the program to alter font sizes easily on the display.

As for printing, you'd want to use _PRINTSCREEN, as LPRINT doesn't work with font changes. (Unless you know the escape/formatting codes and such for your particular model of printer -- but even then, it'd still be more work to implement than to just make use of a simple _PRINTIMAGE.)
Reply
#3
Thanks Steve
Reply
#4
For those looking for a good alternative CP437 capable IDE font, have a look on this post in the old Forum https://qb64forum.alephc.xyz/index.php?t...#msg128685
Reply
#5
What are font recommendations if one wants an 8X16 ratio 1:2 width to height that is consistent with every char WITHOUT Monospace. Those are the ones I would like to use in GUI and save myself heaps of extra calculations and really wide list boxes.
Monospace makes everything impractically wide.

The default font for IDE works so well, too bad only one size for it.
b = b + ...
Reply
#6
Nothing will work in the IDE without it being monospace. The IDE is SCREEN 0, which doesn't allow for variable width fonts.

As for 1:2 scale fonts, that's rather hard to find. Take a look at any of these and see what you like: https://www.1001fonts.com/monospaced-fonts.html?page=5
Reply
#7
Typically what I'm doing to get a printed copy of my code is to highlight it, copy it and paste the copy of the bottom of my code. Then to this copy I insert LPRINT " at the beginning of each line. In this way, when I run the code I get the results displayed on the screen and a print of code. I'll comment out these LPrint lines when I'm back hacking at the code again and just want the results to display on the screen.

What I was hoping to do, was have the main module is the default font with a different font for Subroutines and a 3rd font for Functions. In this way when I'm printing off multiple pages of code I can quickly follow the flow on the printed page.

I'm thinking, if the IDE could allow me to highlight a section of my code and change it to a different font for printing purposes, that would be great. I guess monospacing would be fine.
Reply
#8
Thanks for the link @admin looks interesting.
b = b + ...
Reply
#9
(08-02-2022, 04:36 PM)admin Wrote: Nothing will work in the IDE without it being monospace.  The IDE is SCREEN 0, which doesn't allow for variable width fonts.

As for 1:2 scale fonts, that's rather hard to find.  Take a look at any of these and see what you like: https://www.1001fonts.com/monospaced-fonts.html?page=5

SCREEN 0, the only screen anyone should ever need!

LOL@bplus on another post where he calls it SCREEN Nothing!

Pete
If eggs are brain food, Biden takes his scrambled.
Reply




Users browsing this thread: 8 Guest(s)