Opened 15 years ago

Last modified 4 years ago

#52 new defect

Create FreeType driver for OS/2 bitmap fonts

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

Description

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 (http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/winfonts). See also #41 for more info.

Change History (18)

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

BTW, recalling about "Workplace Sans" (http://users.socis.ca/~ataylo00/creative/fonts/) 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 15 years ago by Dmitry A. Kuminov

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

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

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 14 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 14 years ago by Dmitry A. Kuminov

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 14 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 14 years ago by Dmitry A. Kuminov

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 14 years ago by Dmitry A. Kuminov

BTW, regarding getting notifications from trac. You should probably re-enter your e-mail on the http://svn.netlabs.org/qt4/prefs 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 14 years ago by Dmitry A. Kuminov

Milestone: Qt GAQt Enhanced
Priority: majorminor
Severity: low

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

comment:10 Changed 10 years ago by Alex Taylor

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 10 years ago by Dmitry A. Kuminov

Type: enhancementdefect

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 10 years ago by Dmitry A. Kuminov

Type: defectenhancement

comment:13 Changed 10 years ago by Alex Taylor

Binary: http://www.altsan.org/programming/os2font_bin.zip
Source code: http://www.altsan.org/programming/os2font_src.zip

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 10 years ago by Dmitry A. Kuminov

Type: enhancementdefect

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

comment:15 Changed 6 years ago by Silvan Scherrer

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

comment:16 Changed 5 years ago by Silvan Scherrer

Milestone: Qt Enhanced

Ticket retargeted after milestone closed

comment:17 Changed 4 years ago by Silvan Scherrer

are we still thinking of doing that? as if yes we need to move the ticket.
@dmik any comment about that?

comment:18 Changed 4 years ago by Alex Taylor

FWIW, my standalone parser now resides on my github site: https://github.com/altsan/os2-gpi-font-tools/tree/master/parser

(I updated it slightly a while back to use explicit integer lengths for better cross-platform support.)

Note: See TracTickets for help on using tickets.