Using fork fonts for OS 9 in CSS with @ font-face

I have some old OS 9 fonts that contain font data in a fork resource. When I try to associate such a font with the @ font-face font and open the HTML in the browser, the text is still displayed in the default font.

During the search, I found that the font data can be copied to a regular ttf file using the rsrc attribute. So I cp <font>/rsrc <font>-attr.ttf command cp <font>/rsrc <font>-attr.ttf and tried to link the new file with the @ font-face font. Again, the text appeared in the default font.

Another stackoverflow discussion suggests binary printing and data copying using xattr -p <font> | xxd -r > <font>-xxd.ttx xattr -p <font> | xxd -r > <font>-xxd.ttx . Once again, the link to this file has not changed.

To make sure that the HTML is correct, I linked the new ttf font from the same directory and it worked correctly. Does anyone know if old fonts can be used in @ font-face with or without conversion. Thanks.

+7
source share
2 answers

Font Suitcases can contain two different fonts: bitmap fonts and TrueType fonts. Raster fonts will be 'NFNT' resources along with the required 'FOND' (font family information). TrueType fonts, on the other hand, would be 'sfnt' resources, as well as essential 'FOND' (font family information). Typically, font cases containing bitmap font data make up only half the font; for use, you will need additional PostScript Outline font files (they will have an LWFN icon).

Otherwise, the font case may be a TrueType font, which is truly stand-alone compared to the "PostScript Type 1 Font".

To convert from a resource-based Mac TrueType font to a Windows TrueType font, you just need to extract the resource records 'sfnt' ).

Since Rosetta is no longer there, I don’t have a Resorcerer, so I managed to hack the barebones resource file editor.

http://www.markdouma.com/developer/ResourceFinagler.zip

I added a few lines so that you can now select individual 'sfnt' resources, as shown in the image below, and drag them to the Finder to create separate Windows TrueType fonts.

enter image description here

enter image description here

+31
source

The font data in the suitcase of the old Mac OS font is not in TTF format - copying the resource plug to the TTF file will give you the Mac OS resource data in the file named "font.ttf", which is wrong. To perform the conversion, you will need a tool, for example FontForge (free / open source).

0
source

All Articles