freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] [patch] vertical metrics zero for OpenType CFF


From: Mike Moening
Subject: [ft-devel] [patch] vertical metrics zero for OpenType CFF
Date: Thu, 22 Sep 2005 13:17:28 -0500

I've included a patch for a bug in FreeType related to zero values for vertical 
metrics for OpenType CFF fonts.
The main.cpp file is a small code snippet used to illustrate the problem. We 
are testing with the KozMinPro-Heavy.otf font (a Japanese vertical font from 
Adobe)  Pass the font name as the argument to the program.

A patch in unified diff format is attached as well.  The fix was to add a new 
function (cff_face_get_metrics) to the cffgload.c file.  The function is called 
from within the cff_slot_load function to fill in the vertBearingY and 
vertAdvance members of the metrics struct which were hard coded to zero in this 
function. 
My assumption is that the FreeType team didn't have time to implement this yet. 
This function accesses the vtmx table of the font if it exists.
The guts of the function were basically copied from the ttgload.c file which 
seemed to have everything needed to suck in vertical metrics from the table.

Please provide feedback as I am very new to FreeType. The fix seemed a little 
too easy, so I probably missed something!  Also similar logic may need to be 
implemented elsewhere.

Thanks,

Mike M


 <<main.cpp>>  <<OpenTypeCFFVerticalMetricPatch.txt>> 

Attachment: main.cpp
Description: main.cpp

Attachment: OpenTypeCFFVerticalMetricPatch.txt
Description: OpenTypeCFFVerticalMetricPatch.txt


reply via email to

[Prev in Thread] Current Thread [Next in Thread]