Font List and Current Font
Moderator: Rathinagiri
Font List and Current Font
Dear Sirs,
Is there any HMG functions to get all installed fonts ?
or How to get the current Font in effect ?
Thks n Rgds
Chang
Is there any HMG functions to get all installed fonts ?
or How to get the current Font in effect ?
Thks n Rgds
Chang
Just Hmg It !
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Font List and Current Font
Hi,
Please see here.
http://hmgforum.com/viewtopic.php?p=34197#p34197" onclick="window.open(this.href);return false;
Please see here.
http://hmgforum.com/viewtopic.php?p=34197#p34197" onclick="window.open(this.href);return false;
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Font List and Current Font
Ok Sir and thanks,
BTW, how to entry the link in this post ?
BTW, how to entry the link in this post ?
- Attachments
-
- links.JPG (10.67 KiB) Viewed 5599 times
Just Hmg It !
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Font List and Current Font
Just put URL tag in your linkhmgchang wrote:Ok Sir and thanks,
BTW, how to entry the link in this post ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Font List and Current Font with size
I wonder if we have functions to return an array of available fontsize ?
aFontsize := GetFontSize( "Arial")
or other font properties.
Thks n Rgds
Chang
aFontsize := GetFontSize( "Arial")
or other font properties.
Thks n Rgds
Chang
Just Hmg It !
Re: Font List and Current Font
If you're using TTF font, you can use any size - this is vector font.
Bold, italic fonts are placed in different files (see windows\fonts).
Bold, italic fonts are placed in different files (see windows\fonts).
Re: Font List and Current Font
Thks Mol for your quick info...
Is that mean that I can adjust to any fontsize to fit the paper width ?
And one more thing about font is the Pt( Point).
I read that fontsize eg. 10pt is the height of the font.
How about the width ? any way to measure the width of a word or sentence?
Thks n Rgds
Chang
Is that mean that I can adjust to any fontsize to fit the paper width ?
And one more thing about font is the Pt( Point).
I read that fontsize eg. 10pt is the height of the font.
How about the width ? any way to measure the width of a word or sentence?
Thks n Rgds
Chang
Just Hmg It !
Re: Font List and Current Font
When you use proportional font, every character has different width.
you can use this function to calculate print length:
you can use this function to calculate print length:
Code: Select all
function PrintLen( cString,nFontsize,cFontname)
return round(gettextwidth(Nil,cString,cFontname)*0.072/72*25.4*nFontsize,2)
Re: Font List and Current Font
Thks Mol,
Printlen is for fixed width fonts and
return round(gettextwidth(Nil,cString,cFontname)*0.072/72*25.4*nFontsize,2)
is for non-fixed width fonts !
and the 0.072 is the height ( fontsize) to width ratio ?
Code:
function PrintLen( cString,nFontsize,cFontname)
return round(gettextwidth(Nil,cString,cFontname)*0.072/72*25.4*nFontsize,2)
Printlen is for fixed width fonts and
return round(gettextwidth(Nil,cString,cFontname)*0.072/72*25.4*nFontsize,2)
is for non-fixed width fonts !
and the 0.072 is the height ( fontsize) to width ratio ?
Just Hmg It !
Re: Font List and Current Font
0.072/72 *25.4 is from conversion from inches (72dpi) to milimetres.