Author: fejj
Date: 2007-10-03 17:00:05 -0400 (Wed, 03 Oct 2007)
New Revision: 86833
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/font.cpp
trunk/moon/src/font.h
Log:
2007-10-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
* font.cpp (EmSize): Removed, not needed.
(GetGlyphInfo): Commented out vertical glyph metrics, saves a fair
bit of memory that we aren't using.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-10-03 20:43:12 UTC (rev 86832)
+++ trunk/moon/src/ChangeLog 2007-10-03 21:00:05 UTC (rev 86833)
@@ -1,5 +1,9 @@
2007-10-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
+ * font.cpp (EmSize): Removed, not needed.
+ (GetGlyphInfo): Commented out vertical glyph metrics, saves a fair
+ bit of memory that we aren't using.
+
* text.cpp (TextBlock::SetFontSource): Implemented.
(text_init): Default StyleSimulations to None.
Modified: trunk/moon/src/font.cpp
===================================================================
--- trunk/moon/src/font.cpp 2007-10-03 20:43:12 UTC (rev 86832)
+++ trunk/moon/src/font.cpp 2007-10-03 21:00:05 UTC (rev 86833)
@@ -250,12 +250,6 @@
return (face->face_flags & FT_FACE_FLAG_SCALABLE);
}
-int
-TextFont::EmSize ()
-{
- return face->units_per_EM;
-}
-
double
TextFont::Kerning (gunichar left, gunichar right)
{
@@ -481,16 +475,16 @@
glyph->metrics.horiBearingX =
face->glyph->metrics.horiBearingX / 64.0;
glyph->metrics.horiBearingY =
face->glyph->metrics.horiBearingY / 64.0;
glyph->metrics.horiAdvance =
face->glyph->metrics.horiAdvance / 64.0;
- glyph->metrics.vertBearingX =
face->glyph->metrics.vertBearingX / 64.0;
- glyph->metrics.vertBearingY =
face->glyph->metrics.vertBearingY / 64.0;
- glyph->metrics.vertAdvance =
face->glyph->metrics.vertAdvance / 64.0;
+ //glyph->metrics.vertBearingX =
face->glyph->metrics.vertBearingX / 64.0;
+ //glyph->metrics.vertBearingY =
face->glyph->metrics.vertBearingY / 64.0;
+ //glyph->metrics.vertAdvance =
face->glyph->metrics.vertAdvance / 64.0;
glyph->metrics.height = face->glyph->metrics.height /
64.0;
glyph->metrics.width = face->glyph->metrics.width /
64.0;
} else if (unichar == 0x20 || unichar == 0x09) {
glyph->metrics.horiBearingX = 0.0;
glyph->metrics.horiBearingY = 0.0;
- glyph->metrics.vertBearingX = 0.0;
- glyph->metrics.vertBearingY = 0.0;
+ //glyph->metrics.vertBearingX = 0.0;
+ //glyph->metrics.vertBearingY = 0.0;
if (glyph->bitmap) {
glyph->bitmap->height = 0;
@@ -502,13 +496,13 @@
if (unichar == 0x20) {
// Space
glyph->metrics.horiAdvance =
face->max_advance_width / 64.0;
- glyph->metrics.vertAdvance =
face->max_advance_height / 64.0;
+ //glyph->metrics.vertAdvance =
face->max_advance_height / 64.0;
glyph->metrics.height =
face->max_advance_height / 64.0;
glyph->metrics.width = face->max_advance_width
/ 64.0;
} else if (unichar == 0x09) {
// Tab
glyph->metrics.horiAdvance =
face->max_advance_width / 8.0;
- glyph->metrics.vertAdvance =
face->max_advance_height / 64.0;
+ //glyph->metrics.vertAdvance =
face->max_advance_height / 64.0;
glyph->metrics.height =
face->max_advance_height / 64.0;
glyph->metrics.width = face->max_advance_width
/ 8.0;
}
@@ -523,10 +517,10 @@
glyph->metrics.horiBearingX = 0.0;
glyph->metrics.horiBearingY = 0.0;
- glyph->metrics.vertBearingX = 0.0;
- glyph->metrics.vertBearingY = 0.0;
+ //glyph->metrics.vertBearingX = 0.0;
+ //glyph->metrics.vertBearingY = 0.0;
glyph->metrics.horiAdvance = 0.0;
- glyph->metrics.vertAdvance = 0.0;
+ //glyph->metrics.vertAdvance = 0.0;
glyph->metrics.height = 0.0;
glyph->metrics.width = 0.0;
}
Modified: trunk/moon/src/font.h
===================================================================
--- trunk/moon/src/font.h 2007-10-03 20:43:12 UTC (rev 86832)
+++ trunk/moon/src/font.h 2007-10-03 21:00:05 UTC (rev 86833)
@@ -94,9 +94,9 @@
double horiBearingX;
double horiBearingY;
double horiAdvance;
- double vertBearingX;
- double vertBearingY;
- double vertAdvance;
+ //double vertBearingX;
+ //double vertBearingY;
+ //double vertAdvance;
double height;
double width;
};
@@ -140,7 +140,6 @@
double Descender ();
double Ascender ();
double Height ();
- int EmSize ();
double UnderlinePosition ();
double UnderlineThickness ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches