Opened 9 years ago

Closed 8 years ago

#41 closed task (fixed)

Port QFont, QFontEngine and QFontDatabase

Reported by: dmik Owned by: dmik
Priority: major Milestone: QtGui Beta
Component: QtGui Version: 4.5.1 Beta 1
Severity: Keywords:


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

Change History (5)

comment:1 Changed 9 years ago by dmik

  • Owner set to dmik
  • Status changed from new to accepted

comment:2 Changed 9 years ago by dmik

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

comment:3 Changed 8 years ago by dmik

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 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 8 years ago by diver

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

comment:5 Changed 8 years ago by dmik

  • Resolution set to fixed
  • Status changed from accepted to closed

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.