Opened 15 years ago
Last modified 15 years ago
#51 closed enhancement
Use OS/2 font database to match fonts — at Version 9
Reported by: | Dmitry A. Kuminov | Owned by: | Dmitry A. Kuminov |
---|---|---|---|
Priority: | blocker | Milestone: | Qt Beta 3 |
Component: | QtGui | Version: | 4.5.1 Beta 1 |
Severity: | Keywords: | ||
Cc: |
Description (last modified by )
We will use the Freetype2 library to cache installed fonts and perform font matching for Qt applications (refer to #41 for more info).
Change History (9)
comment:1 by , 15 years ago
Priority: | major → blocker |
---|
comment:2 by , 15 years ago
Milestone: | Qt GA → Qt Beta 3 |
---|
comment:3 by , 15 years ago
I'm leaning to dropping fontconfig support actually. Its main purpose is to make the font configuration on a given system centralized and static across different applications. While this is really makes sense for Linux systems, on OS/2 font configuration is already pretty centralized and static.
Besides, fontconfig requires libxml and both these libraries aren't normal citizens of the typical OS/2 setup which means that we have to statically compile them into Qt which I consider as an overkill for a simple task of selecting a font file based on the requested font properties.
The OS/2 font database contains all basic information we need when choosing fonts. If we want more (e.g. font substitution, anti-aliasing and hint rules based on font family etc) we will add support for that through recognizing extra keys in OS2.INI.
If some day later the situation changes and many OS/2 applications start using fontconfig + libxml, we are always able to switch to fontconfig in Qt4 too.
comment:4 by , 15 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:5 by , 15 years ago
Summary: | Use fontconfig to match fonts → Use OS/2 font database to match fonts |
---|
comment:7 by , 15 years ago
Actually, we don't have direct access to font file names when enumerating installed fonts using the GPI API (GpiQueryFonts), we only get properties (style, size, etc). While there is a GpiQueryFullFontDescs call which may extract families and face names found in a specified file, I don't find it sane to
- Enumerate fonts with GpiQueryFonts
- Get file names from the PM_Fonts registry key and pair them with enumerated fonts using GpiQueryFullFontDescs
- Eventually pass those filenames down to Freetype2 for rendering
provided that using Freetype2 we can bypass GPI completely, and besides that GPI and Freetype2 may interpret some fonts differently and the opinion of the one which will actually render them (Freetype2) is obviously more important.
So, I'll better go through PM_Fonts and get their properties with Freetype2. We will of course not see fonts built into resource DLLs in such case (e.g. WarpSans, System Proportional, System VIO etc) but it's not a big deal ATM since these fonts cannot be rendered by Freetype2 directly anyway (we'll need a driver for doing that, see #52).
comment:8 by , 15 years ago
Implemented the Freetype2 way in r222. Also implemented font matching so that all available outline fonts (TTF and PFB) can now be selected in Qt applications.
There are minor glitches for tomorrow:
- non-Latin1 input is broken.
- requesting an unknown family causes the list of fonts to be reloaded and rescanned (slow).
comment:9 by , 15 years ago
Description: | modified (diff) |
---|
A must for the GA.