Opened 10 years ago

Last modified 15 months ago

#52 new defect

Create FreeType driver for OS/2 bitmap fonts

Reported by: dmik Owned by:
Priority: minor Milestone: Qt Enhanced
Component: QtGui Version: 4.5.1 Beta 1
Severity: low Keywords:
Cc: pmw


In order to support OS/2 bitmap fonts, we need a driver that will read and rasterise them. FreeType? already contains a similar driver for Windows bitmap fonts ( See also #41 for more info.

Change History (15)

comment:1 Changed 10 years ago by dmik

BTW, recalling about "Workplace Sans" ( pushed me to the following idea: instead of writing a driver for the OS/2 .FON format (which is NOT an easy task) we can convert all bitmap OS/2 fonts (WarpSans?, System Proportional, System VIO etc) to another format supported by Freetype2, e.g to Windows FNT files (or to dummy TTFs that contain nothing but bitmap stripes which are copies of OS/2 bitmap fonts for all existing sizes).

comment:2 Changed 10 years ago by dmik

It'd be nice if we found a volunteer for this task.

comment:3 Changed 10 years ago by dmik

In r238, I added a temporary code that substitutes "WarpSans?" with "Workplace Sans" until we provide support for OS/2 bitmap fonts (including "WarpSans?") in some form. This is done to get more native look and feel if "Workplace Sans" is installed.

comment:4 Changed 10 years ago by pmw

  • Cc pmw added

If you would find a volunteer or do this yourself, you would make many users of Firefox happy, too.

One extra problem is that several of the most relevant fonts (WarpSans?, System Proportional, System VIO) are not inside .FON files, but in DSPRES.DLL!

comment:5 Changed 10 years ago by dmik

Yes, I know that but it's not actually a problem: they can be easily extracted from there using the resource decompiler and put to regular .FON files.

While thinking more on this, I tend to a conclusion that we only need "WarpSans?" (basically because its look and feel really rocks) and there is little use of all other bitmap fonts nowadays (Only System Mono is in frequent use, but only for text mode apps which is a different story). So I think we should concentrate on making "Workplace Sans" a complete family (e.g. add bold, italic and bold italic styles for it) and permanently substitute WarpSans? with it, instead of converting the others to some different format.

If you have arguments on that, you are welcome.

comment:6 Changed 10 years ago by pmw

(Sorry to react so late. I don't get mails from these tickets for some reason.)

Yes, I personally agree, Workplace Sans makes a pretty good replacement. Especially Alex' new v0.6 for the regular variant and v0.2 of the bold variant gets usable, too. I didn't manage to get PM to produce any italic version of WarpSans? so those won't be of much use for the purpose here. (In Mozilla apps I just slant a font if italics are requested, using a transformation matrix to skew the fonts by 12 degrees as done in FreeType?'s ftview program.)

I got some complaints from people who are using System VIO and System Proportional for PM UI elements, but there are very few people who do that.

comment:7 Changed 10 years ago by dmik

I was thinking about emulating bold and italic (using filled outlines and skewing -- GTK or something in between does that too, though outlines don't look very good for obvious reasons, italic is a bit better). But we also may try find a contributor who would create a real italics version which is of course preferable.

I agree that it may be not worth to create an OS/2 bitmap font driver for Freetype a number of people needing that and the difficulty into account.

And yes, 0.6/0.2 looks way better. Good that Alex was so responsive about that.

comment:8 Changed 10 years ago by dmik

BTW, regarding getting notifications from trac. You should probably re-enter your e-mail on the page (or may be ask Adrian to kick trac). It didn't work for me either until somebody did something (sorry, I can't recall what exactly).

comment:9 Changed 9 years ago by dmik

  • Milestone changed from Qt GA to Qt Enhanced
  • Priority changed from major to minor
  • Severity set to low

We are not going to do it in the near future. Putting to Enhanced with the low priority.

comment:10 Changed 5 years ago by ataylor

FWIW, I was actually going to try and do this at one point. I got as far as successfully writing a standalone parser/handler for OS/2 bitmap fonts, but got bogged down in trying to learn enough of FreeType?'s internals to integrate it.

comment:11 Changed 5 years ago by dmik

  • Type changed from enhancement to defect

Really interesting. Can you put your code somewhere? E.g. attach here as a ZIP? Just in case if someone decides to pick it up and finish this task.

comment:12 Changed 5 years ago by dmik

  • Type changed from defect to enhancement

comment:13 Changed 5 years ago by ataylor

Source code:

The source should have zero dependencies on the OS/2 toolkit. I built it with ICC but AFAIK any C compiler should work.

comment:14 Changed 5 years ago by dmik

  • Type changed from enhancement to defect

Thx, this is to be checked when the Qt work is resumed, too.

comment:15 Changed 15 months ago by diver

ft2lib contains this part in their internal freetype implementation. we could add it to our freetype and have it systemwide.

Note: See TracTickets for help on using tickets.