mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1109403 - trim out unused Azure FontOptions struct. r=m_kato
This commit is contained in:
parent
27230b5419
commit
9662cfeab4
14
gfx/2d/2D.h
14
gfx/2d/2D.h
@ -598,20 +598,6 @@ protected:
|
||||
UserData mUserData;
|
||||
};
|
||||
|
||||
#ifdef MOZ_ENABLE_FREETYPE
|
||||
/**
|
||||
* Describes a font.
|
||||
* Used to pass the key informatin from a gfxFont into Azure
|
||||
* @todo Should be replaced by a more long term solution, perhaps Bug 738014
|
||||
*/
|
||||
struct FontOptions
|
||||
{
|
||||
std::string mName;
|
||||
FontStyle mStyle;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
/** This class is designed to allow passing additional glyph rendering
|
||||
* parameters to the glyph drawing functions. This is an empty wrapper class
|
||||
* merely used to allow holding on to and passing around platform specific
|
||||
|
@ -20,7 +20,6 @@ gfxFT2FontBase::gfxFT2FontBase(cairo_scaled_font_t *aScaledFont,
|
||||
mHasMetrics(false)
|
||||
{
|
||||
cairo_scaled_font_reference(mScaledFont);
|
||||
ConstructFontOptions();
|
||||
}
|
||||
|
||||
gfxFT2FontBase::~gfxFT2FontBase()
|
||||
@ -216,25 +215,3 @@ gfxFT2FontBase::SetupCairoFont(gfxContext *aContext)
|
||||
cairo_set_scaled_font(cr, cairoFont);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
gfxFT2FontBase::ConstructFontOptions()
|
||||
{
|
||||
NS_LossyConvertUTF16toASCII name(this->GetName());
|
||||
mFontOptions.mName = name.get();
|
||||
|
||||
const gfxFontStyle* style = this->GetStyle();
|
||||
if (style->style == NS_FONT_STYLE_ITALIC) {
|
||||
if (style->weight == NS_FONT_WEIGHT_BOLD) {
|
||||
mFontOptions.mStyle = FontStyle::BOLD_ITALIC;
|
||||
} else {
|
||||
mFontOptions.mStyle = FontStyle::ITALIC;
|
||||
}
|
||||
} else {
|
||||
if (style->weight == NS_FONT_WEIGHT_BOLD) {
|
||||
mFontOptions.mStyle = FontStyle::BOLD;
|
||||
} else {
|
||||
mFontOptions.mStyle = FontStyle::NORMAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,18 +34,12 @@ public:
|
||||
|
||||
virtual FontType GetType() const MOZ_OVERRIDE { return FONT_TYPE_FT2; }
|
||||
|
||||
mozilla::gfx::FontOptions* GetFontOptions() { return &mFontOptions; }
|
||||
|
||||
protected:
|
||||
virtual const Metrics& GetHorizontalMetrics() MOZ_OVERRIDE;
|
||||
|
||||
uint32_t mSpaceGlyph;
|
||||
bool mHasMetrics;
|
||||
Metrics mMetrics;
|
||||
|
||||
// Azure font description
|
||||
mozilla::gfx::FontOptions mFontOptions;
|
||||
void ConstructFontOptions();
|
||||
};
|
||||
|
||||
#endif /* GFX_FT2FONTBASE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user