Opened 11 years ago

Closed 11 years ago

#41 closed task (fixed)

Port QFont, QFontEngine and QFontDatabase

Reported by: Dmitry A. Kuminov Owned by: Dmitry A. Kuminov
Priority: major Milestone: QtGui Beta
Component: QtGui Version: 4.5.1 Beta 1
Severity: Keywords:
Cc:

Description

Provide the OS/2 version of the QFont, QFontEngine and QFontDatabase classes.

Change History (5)

comment:1 Changed 11 years ago by Dmitry A. Kuminov

Owner: set to Dmitry A. Kuminov
Status: newaccepted

comment:2 Changed 11 years ago by Dmitry A. Kuminov

In r124, I enabled test font engines that draw boxes instead of real characters -- they seem to work well.

comment:3 Changed 11 years ago by Dmitry A. Kuminov

In r125, I added QFontEnginePMFT that uses QFontEngineFT to draw fonts with the FreeType? library (included in Qt4 sources). This seems to work well, except that the standard OS/2 bitmap fonts (WarpSans?, System Proportional etc) are not available through FreeType? because they are PM resources rather than separate files and I'm also not sure that FreeType? understands the format of the OS/2 bitmap fonts out-of-the-box.

Though it seems to be an (aestetic) issue, it won't get any workaround in the upcoming Beta. What about the GA, there are two possible solutions:

  1. Write a font driver for FreeType? (similar to http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/winfonts) that can read OS/2 bitmap fonts including those stored in the resource DLL.
  2. Write a separate QFontEngine derivant that uses GPI to draw OS/2 bitmap fonts.

1 is obviously the preferred solution but it may be a bit tricky (while 2 is more nasty and involves the oudated GPI font handling routines which will have a negative impact on antialiasing, matrix transformations etc).

The next step for the beta is to attach the fontconfig library for doing font matching (currently, C:\PSFONTS\HELV.PFB is always selected for text drawing).

comment:4 Changed 11 years ago by Silvan Scherrer

i also vote for 1, as i think it's less code and less pain for a further port.

comment:5 Changed 11 years ago by Dmitry A. Kuminov

Resolution: fixed
Status: acceptedclosed

No time for this in the Beta; a single font is enough for demonstration. Created #51 and #52 instead.

Note: See TracTickets for help on using tickets.