// Ideally we want to use FT_Face here but as there is currently no way to get
// an SkTypeface from an FT_Face we do this.
ScaledFontFreetype::ScaledFontFreetype(gfxFont* aFont, Float aSize)
  : ScaledFontBase(aSize)
{
#ifdef USE_SKIA
  NS_LossyConvertUTF16toASCII name(aFont->GetName());
  mTypeface = SkTypeface::CreateFromName(name.get(), gfxFontStyleToSkia(aFont->GetStyle()));
#endif
}
ScaledFontSkia::ScaledFontSkia(gfxFont* aFont, Float aSize)
  : mSize(aSize)
{
  NS_LossyConvertUTF16toASCII name(aFont->GetName());
  mTypeface = SkTypeface::CreateFromName(name.get(), gfxFontStyleToSkia(aFont->GetStyle()));
}