Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
LazUtils
»
[LazFreeType] How to read information from a font file?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Install new .deb over exi...
by
LeP
[
Today
at 06:36:34 pm]
Lazarus interface to Rexx...
by
mdlueck
[
Today
at 06:17:45 pm]
WASM import error
by
lebao3105
[
Today
at 05:51:47 pm]
OpenDocument('Filename') ...
by
J-G
[
Today
at 05:23:26 pm]
Lazarus Bugfix Release 4....
by
n7800
[
Today
at 04:56:57 pm]
Discipline your AI coding...
by
Weiss
[
Today
at 04:37:42 pm]
Lazarus Main not building...
by
dsiders
[
Today
at 03:01:07 pm]
Hello. I'm new to this co...
by
zeljko
[
Today
at 02:17:38 pm]
TCollection wiki entry
by
Thaddy
[
Today
at 01:24:21 pm]
weird error message
by
cdbc
[
Today
at 12:23:13 pm]
Freepascal
by
LeP
[
Today
at 09:40:33 am]
TTL Record Count, i.e. a ...
by
Zvoni
[
Today
at 09:10:08 am]
Printing on HP Smart Tank
by
Thaddy
[
Today
at 07:10:37 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[
Today
at 06:38:27 am]
MVP made easier.
by
cdbc
[
Today
at 06:18:24 am]
I have made some progress...
by
onionmixer
[
Today
at 02:57:55 am]
Lazarus 4.6 may erase you...
by
Martin_fr
[July 12, 2026, 06:35:29 pm]
Best name for procedure
by
LemonParty
[July 12, 2026, 05:23:02 pm]
Fixed an RV32ec compiler ...
by
MattBradford
[July 12, 2026, 05:11:16 pm]
Many recent books on Laza...
by
Tomu
[July 12, 2026, 05:02:44 pm]
International Pascal Cong...
by
zeljko
[July 12, 2026, 04:08:53 pm]
equivalent to C/C++ "offs...
by
jamie
[July 12, 2026, 02:43:16 pm]
val return code
by
ALLIGATOR
[July 12, 2026, 01:40:21 pm]
Help needed on how to do ...
by
cdbc
[July 12, 2026, 12:15:15 pm]
PascalRAL the fastest, mo...
by
Mobius1
[July 12, 2026, 11:24:00 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [LazFreeType] How to read information from a font file? (Read 12011 times)
felipemdc
Administrator
Hero Member
Posts: 3538
[LazFreeType] How to read information from a font file?
«
on:
March 06, 2012, 01:11:09 pm »
It would be great to have an example on that, thanks
«
Last Edit: March 06, 2012, 01:48:10 pm by felipemdc
»
Logged
zeljko
Hero Member
Posts: 1982
Re: [LazFreeType] How to read information from a font file?
«
Reply #1 on:
March 10, 2012, 02:22:41 pm »
I guess that such code exists in fontconfig source.
Logged
felipemdc
Administrator
Hero Member
Posts: 3538
Re: [LazFreeType] How to read information from a font file?
«
Reply #2 on:
March 11, 2012, 09:56:01 am »
But LCL-CustomDrawn uses non-native text in multiple operating systems where fontconfig does not exist (Windows, Mac OS X, Android). I was hoping that circular would know the answer.
Logged
felipemdc
Administrator
Hero Member
Posts: 3538
Re: [LazFreeType] How to read information from a font file?
«
Reply #3 on:
March 11, 2012, 11:24:42 am »
Ok, so I will answer my own question. Guiliano Colla found out how to do this and he sent me a patch, and here it is:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/interfaces/customdrawn/customdrawnproc.pas?root=lazarus&r1=35879&r2=35878&pathrev=35879
I think that the most important part is:
TT_Get_Name_String(AFace,J,NameString,NameLen);
Which is part of LazFreeType. But in general the entire routine there is a nice example of how to extract font information with LazFreeType
Logged
zeljko
Hero Member
Posts: 1982
Re: [LazFreeType] How to read information from a font file?
«
Reply #4 on:
March 11, 2012, 04:17:25 pm »
I didn't mean that you'll use fontconfig, but to see in source how it is extracted.
Logged
circular
Hero Member
Posts: 4471
Re: [LazFreeType] How to read information from a font file?
«
Reply #5 on:
March 23, 2012, 05:13:10 pm »
There are now properties Ascent, Descent, LineSpacing and FullLineHeight in TFreeTypeFont.
About the name, apparently, it can be in many languages. Maybe we can use English name only for now.
Logged
Conscience is the debugger of the mind
circular
Hero Member
Posts: 4471
Re: [LazFreeType] How to read information from a font file?
«
Reply #6 on:
March 24, 2012, 08:27:47 pm »
I've found how to get names. Soon I will put here a test program that reads a directory of fonts.
Logged
Conscience is the debugger of the mind
circular
Hero Member
Posts: 4471
Re: [LazFreeType] How to read information from a font file?
«
Reply #7 on:
March 24, 2012, 08:40:30 pm »
Here is a test program that allows to explore a directory of fonts. This mechanism will be directly included in LazFreeType later.
Note : you need to use the second patch of LazFreeType.
Logged
Conscience is the debugger of the mind
circular
Hero Member
Posts: 4471
Re: [LazFreeType] How to read information from a font file?
«
Reply #8 on:
April 12, 2012, 04:19:56 pm »
Here is an updated version.
Logged
Conscience is the debugger of the mind
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
LazUtils
»
[LazFreeType] How to read information from a font file?
TinyPortal
© 2005-2018