[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] PFR FontMatrix
From: |
Detlef Würkner |
Subject: |
[Devel] PFR FontMatrix |
Date: |
Thu, 27 Jun 2002 20:49:18 +0200 |
address@hidden (Sven Neumann) wrote:
> address@hidden (Detlef Würkner) writes:
>
> > Btw, the PFR driver parses the FontMatrix (log_font->matrix[]) but does
> > not apply it to the font. But didnt find a PFR font with a matrix
> > different from [256, 0, 0, 256] (read [1.0 0 0 1.0]) anyway...
>
> however it wouldn't hurt to add code that applies the matrix, or would
> it?
Hm. What about this?
----8<----
--- freetype-2.1.2/src/pfr/pfrobjs.c.ori Sat Jun 22 13:35:41 2002
+++ freetype-2.1.2/src/pfr/pfrobjs.c Thu Jun 27 18:44:46 2002
@@ -288,6 +288,21 @@
metrics->vertBearingX = 0;
metrics->vertBearingY = 0;
+#if 1
+ /* apply the font matrix, if any */
+ /* TODO: test with existing font with unusual matrix */
+ /* whether we have to adjust Units per EM */
+ {
+ FT_Matrix font_matrix;
+
+ font_matrix.xx = face->log_font.matrix[0] << 8;
+ font_matrix.yx = face->log_font.matrix[1] << 8;
+ font_matrix.xy = face->log_font.matrix[2] << 8;
+ font_matrix.yy = face->log_font.matrix[3] << 8;
+ FT_Outline_Transform( outline, &font_matrix );
+ }
+#endif
+
/* scale when needed */
if ( scaling )
{
----8<----
Ciao, Detlef
--
_ // address@hidden
\X/ Detlef Wuerkner, Langgoens/Germany
- Re: [Devel] Freetype 2.1.2 & rotated text, (continued)
- Re: [Devel] Freetype 2.1.2 & rotated text, Detlef Würkner, 2002/06/26
- Re: [Devel] Freetype 2.1.2 & rotated text, Detlef Würkner, 2002/06/26
- [Devel] Fix for FontMatrix xy swaps, Detlef Würkner, 2002/06/26
- Re: [Devel] Fix for FontMatrix xy swaps, David Turner, 2002/06/26
- Re: [Devel] Fix for FontMatrix xy swaps, Detlef Würkner, 2002/06/27
- Re: [Devel] Fix for FontMatrix xy swaps, Sven Neumann, 2002/06/27
- [Devel] PFR FontMatrix,
Detlef Würkner <=
Re: [Devel] Freetype 2.1.2 & rotated text, Jan Slupski, 2002/06/26