[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Implementation Error of FreeType function FT_Get_PFR_Metrics(
From: |
Chi Nguyen |
Subject: |
[ft-devel] Implementation Error of FreeType function FT_Get_PFR_Metrics() |
Date: |
Mon, 15 Dec 2008 15:46:46 +0700 |
To freetype maintainers,
In developing the test for the freetype function FT_Get_PFR_Metrics(), we
have encountered the following implementation bugs:
1) If we make a call to FT_Get_PFR_Metrics() function with a non-pfr font
(FreeMono.ttf for example) and any of the parameters ametrics_y_scale,
ametrics_resolution, ametrics_x_scale or aoutline_resolution being NULL, a
segmentation fault will happen. The spec specified that any or all of these
parameters can be NULL.
2) If we make a call to FT_Get_PFR_Metrics() function with a non-pfr font
(FreeMono.ttf for example) and none of the parameters ametrics_y_scale,
ametrics_resolution, ametrics_x_scale or aoutline_resolution are NULL the
function returned an error code 0 (success) instead of a non-zero error code
to indicate failure.
We have tested this on 32-bit and 64-bit x86 based test systems running
under the following distros OpenSuSE 11 (32 bit), Ubuntu 8.04 (ia32), RHEL52
x86-64, SLES 10.1 (32bit), Fedora 9 (32bit) with freetype 2.1.10 and
freetype 2.3.7. The non-pfr fonts that we used to verify this claim included
'FreeMono.ttf', 'pala.ttf', 'BSSYM7.TTF' and 'n019043l.pfb'
Included with this email is a c program ft_get_pfr_metrics.c to help
demonstrate these two bugs.
To reproduce the first bug, use "ft_get_pfr_metrics <font_file_name> a b c
d" where at least one or all of {a, b, c, d} is/are 0.
To reproduce the second bug, use "ft_get_pfr_metrics <font_file_name> 1 1 1
1" for example.
The specified <font_file_name> should exist in the local directory ./fonts.
Also included with this email is a snippet of a source code implementation
of the function FT_Get_PFR_Metrics() that we were able to look-up.
Thank you very much for your time and please let us know any ruling/finding
that you may have.
Sincerely yours,
Nguyen Trung Chi
NEC Solutions VietNam
Get_PFR_Metrics.rar
Description: Binary data
- [ft-devel] Implementation Error of FreeType function FT_Get_PFR_Metrics(),
Chi Nguyen <=