shithub: freetype+ttf2subf

Download patch

ref: d580f9d6c328cc8061154f10e0b1056d291f6d44
parent: 1039234c39e036bd40d891cd9e96715a1be595a7
author: Werner Lemberg <[email protected]>
date: Sun Aug 18 18:02:03 EDT 2002

* src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
horiBearingX.
* src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
horiBearingY.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-08-18  Werner Lemberg  <[email protected]>
+
+	* src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
+	horiBearingX.
+	* src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
+	horiBearingY.
+
 2002-08-16  George Williams  <[email protected]>
 
 	Add support for Apple composite glyphs.
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -617,7 +617,8 @@
     /* FZ XXX: TODO: vertical metrics */
     slot->metrics.horiAdvance  = glyph.dwidth << 6;
     slot->metrics.horiBearingX = glyph.bbx.x_offset << 6;
-    slot->metrics.horiBearingY = glyph.bbx.y_offset << 6;
+    slot->metrics.horiBearingY = ( glyph.bbx.y_offset +
+                                   glyph.bbx.height ) << 6;
     slot->metrics.width        = bitmap->width << 6;
     slot->metrics.height       = bitmap->rows << 6;
 
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -388,7 +388,7 @@
       goto Exit;
 
     if ( PCF_BIT_ORDER( face->bitmapsFormat ) != MSBFirst )
-      BitOrderInvert( bitmap->buffer,bytes );
+      BitOrderInvert( bitmap->buffer, bytes );
 
     if ( ( PCF_BYTE_ORDER( face->bitmapsFormat ) !=
            PCF_BIT_ORDER( face->bitmapsFormat )  ) )
@@ -412,7 +412,7 @@
     slot->bitmap_top  = metric->ascent;
 
     slot->metrics.horiAdvance  = metric->characterWidth << 6 ;
-    slot->metrics.horiBearingX = metric->rightSideBearing << 6 ;
+    slot->metrics.horiBearingX = metric->leftSideBearing << 6 ;
     slot->metrics.horiBearingY = metric->ascent << 6 ;
     slot->metrics.width        = metric->characterWidth << 6 ;
     slot->metrics.height       = bitmap->rows << 6;