// SetFont void Painter::SetFont(const BFont& font) { //fFont.SetFamilyAndStyle(font.GetFamily(), font.GetStyle()); fFont.SetSpacing(font.Spacing()); fFont.SetShear(font.Shear()); fFont.SetRotation(font.Rotation()); fFont.SetSize(font.Size()); _UpdateFont(); }
// constructor Font::Font(const BFont& font) : fFamily("") , fStyle("") , fSize(font.Size()) , fRotation(font.Rotation()) , fShear(font.Shear()) , fFalseBoldWidth(0.0) , fHinting(true) , fKerning(true) , fSpacing(font.Spacing()) , fCachedFontHeightValid(true) { font_family family; font_style style; font.GetFamilyAndStyle(&family, &style); fFamily = family; fStyle = style; font.GetHeight(&fCachedFontHeight); }