From 7338ec2b538edf19646a9d33dd3062c6be8cc117 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 3 Apr 2007 14:30:34 +0000 Subject: [PATCH] make FT_Set_Char_Size deal with 0-valued resolution parameter like the other one --- ChangeLog | 6 ++++++ src/base/ftobjs.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3c16866cb..dfdd584fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-03 David Turner + + * src/base/ftobjs.c (FT_Set_Char_Size): As suggested by James Cloos, + if one of the resolution is 0, treat it as if it was the same than + the other value. + 2007-04-02 David Turner Add special code to detect `extra-light' fonts and do not snap their diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index f6fb466aa..bb6d3abc9 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2425,6 +2425,11 @@ else if ( !char_height ) char_height = char_width; + if (!horz_resolution) + horz_resolution = vert_resolution; + else if (!vert_resolution) + vert_resolution = horz_resolution; + if ( char_width < 1 * 64 ) char_width = 1 * 64; if ( char_height < 1 * 64 )