Liberty BASIC Community Forum
« Font size questions »

Welcome Guest. Please Login or Register.
Feb 22nd, 2018, 12:28pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Font size questions  (Read 631 times)
Jeff Root
Senior Member
ImageImageImageImage


member is offline

Avatar

jeff3 at freemars dot org


PM


Posts: 442
xx Font size questions
« Thread started on: Jan 11th, 2003, 02:22am »

On my computer, Liberty Basic defaults to 8 point MS Sans Serif
for text if I don't specify a size myself.  Is that hard-coded
or is it dependant on some Windows setting?

It appears that I have the choice of making text in my programs
a size which I specify, completely ignoring the user's settings,
or getting a current Windows setting for text size and adjust
everything in the layout to fit.  I could, for example, base my
layout on the font size set for text in message boxes.

A second Windows setting which reflects the User's choice is
the "small fonts / large fonts" selection.  Apparently this
increases the displayed size of fonts by 125%.  The problem is,
of course, that the sizes and positions of all controls, as
well as overall window size, depend on the text size.

How do you think I should handle this?

  -- Jeff, in Minneapolis

User IP Logged

Alyce Watson
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 14923
xx Re: Font size questions
« Reply #1 on: Jan 11th, 2003, 05:46am »

on Jan 11th, 2003, 02:22am, Jeff Root wrote:
On my computer, Liberty Basic defaults to 8 point MS Sans Serif
for text if I don't specify a size myself.  Is that hard-coded
or is it dependant on some Windows setting?

How do you think I should handle this?

  -- Jeff, in Minneapolis



It is hard-coded.

You can get a handle to the user's default gui font with an api call.

Code:
    calldll #gdi32, "GetStockObject",_
        _DEFAULT_GUI_FONT as long, hFont as long 


There are api calls to help you determine the font facename and dimensions. They get kind of involved.

You've brought up an excellent point that goes along with Brent's tutorial on his site regarding the use of colors.

Regards,
Alyce
User IP Logged

Alyce
Liberty BASIC Workshop - a complete IDE for Liberty BASIC


Alyce's Restaurant
for Liberty BASIC code, tools and references
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls