Opened 15 years ago

Last modified 5 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 by Dmitry A. Kuminov, 15 years ago

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

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

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

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 by pmw, 15 years ago

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

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 by pmw, 15 years ago

(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 by Dmitry A. Kuminov, 15 years ago

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

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

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 by Alex Taylor, 11 years ago

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

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

Type: defectenhancement

comment:13 by Alex Taylor, 10 years ago

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

Type: enhancementdefect

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

comment:15 by Silvan Scherrer, 7 years ago

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

comment:16 by Silvan Scherrer, 5 years ago

Milestone: Qt Enhanced

Ticket retargeted after milestone closed

comment:17 by Silvan Scherrer, 5 years ago

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

comment:18 by Alex Taylor, 5 years ago

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.