Logo Search packages:      
Sourcecode: pango-graphite version File versions  Download package

FT_Face gr::FreetypeFont::setFace ( FT_Face  face  )  [protected, inherited]

Returns:
set the freetype face.

Definition at line 256 of file FreetypeFont.cpp.

Referenced by gr::FreetypeFont::FreetypeFont(), and PangoGrFont().

{
  m_ftFace = face;

  if (face)
  {
    m_fBold   = (face->style_flags & FT_STYLE_FLAG_BOLD);
    m_fItalic = (face->style_flags & FT_STYLE_FLAG_ITALIC);
  
  m_faceName.resize(strlen(face->family_name));

  std::copy(face->family_name, 
      face->family_name + strlen(face->family_name),
      m_faceName.begin());

  assert(face->size);
  m_pixHeight = float26_6(face->size->metrics.height);
  m_emSquare = face->size->metrics.y_ppem;
  m_ascent = float26_6(face->size->metrics.ascender);
  m_descent = float26_6(face->size->metrics.descender);
  if (m_descent < 0) m_descent = -m_descent;

  assert(m_pixHeight > 0);
  }

  return m_ftFace;
}


Generated by  Doxygen 1.6.0   Back to index