void AGGTextRenderer::SetFont(const ServerFont& font) { fFont = font; // construct an embedded transformation (rotate & shear) fEmbeddedTransformation.Reset(); fEmbeddedTransformation.ShearBy(B_ORIGIN, (90.0 - font.Shear()) * M_PI / 180.0, 0.0); fEmbeddedTransformation.RotateBy(B_ORIGIN, -font.Rotation() * M_PI / 180.0); fContour.width(font.FalseBoldWidth() * 2.0); }
void RemoteMessage::AddFont(const ServerFont& font) { Add(font.Direction()); Add((uint8)font.Encoding()); Add(font.Flags()); Add((uint8)font.Spacing()); Add(font.Shear()); Add(font.Rotation()); Add(font.FalseBoldWidth()); Add(font.Size()); Add(font.Face()); Add(font.GetFamilyAndStyle()); }
void CanvasMessage::AddFont(const ServerFont& font) { //TODO:Use TTF/WOFF URL Add(font.Direction()); Add((uint8)font.Encoding()); Add(font.Flags()); Add((uint8)font.Spacing()); Add(font.Shear()); Add(font.Rotation()); Add(font.FalseBoldWidth()); Add(font.Size()); Add(font.Face()); Add(font.GetFamilyAndStyle()); }
/*static*/ glyph_rendering FontCacheEntry::_RenderTypeFor(const ServerFont& font) { glyph_rendering renderingType = gSubpixelAntialiasing ? glyph_ren_subpix : glyph_ren_native_gray8; if (font.Rotation() != 0.0 || font.Shear() != 90.0 || font.FalseBoldWidth() != 0.0 || font.Flags() & B_DISABLE_ANTIALIASING || font.Size() > 30 || !font.Hinting()) { renderingType = glyph_ren_outline; } return renderingType; }