зеркало из https://github.com/mozilla/pjs.git
Bug 385516 - "Console is spewed with WARNING: empty langgroup" (Add default constructor to gfxFontStyle and use it) [p=wasti.redl@gmx.net (Sebastian Redl) r=stuart a1.9=damons]
This commit is contained in:
Родитель
12600eb2b2
Коммит
3f97851bff
|
@ -45,21 +45,10 @@
|
|||
#include "nsIDeviceContext.h"
|
||||
#include "nsSystemFontsBeOS.h"
|
||||
|
||||
#define DEFAULT_PIXEL_FONT_SIZE 16.0f
|
||||
|
||||
nsSystemFontsBeOS::nsSystemFontsBeOS()
|
||||
: mDefaultFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mMenuFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mCaptionFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mDefaultFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
, mMenuFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
, mCaptionFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
{
|
||||
menu_info info;
|
||||
get_menu_info(&info);
|
||||
|
|
|
@ -108,25 +108,11 @@ MOZ_pango_font_description_get_size_is_absolute(PangoFontDescription *desc)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define DEFAULT_PIXEL_FONT_SIZE 16.0f
|
||||
|
||||
nsSystemFontsGTK2::nsSystemFontsGTK2()
|
||||
: mDefaultFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mButtonFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mFieldFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mMenuFontName(NS_LITERAL_STRING("sans-serif"))
|
||||
, mDefaultFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
, mButtonFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
, mFieldFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
, mMenuFontStyle(FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL,
|
||||
DEFAULT_PIXEL_FONT_SIZE, NS_LITERAL_CSTRING(""),
|
||||
0.0f, PR_TRUE, PR_FALSE)
|
||||
{
|
||||
InitPangoLib();
|
||||
|
||||
|
|
|
@ -394,9 +394,7 @@ nsThebesDeviceContext::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
|
|||
}
|
||||
|
||||
nsString fontName;
|
||||
gfxFontStyle fontStyle(NS_FONT_STYLE_NORMAL, FONT_WEIGHT_NORMAL, 16.0f,
|
||||
NS_LITERAL_CSTRING(""), 0.0f, PR_TRUE,
|
||||
PR_FALSE);
|
||||
gfxFontStyle fontStyle;
|
||||
nsresult rv = gSystemFonts->GetSystemFont(aID, &fontName, &fontStyle);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ class gfxFontGroup;
|
|||
#define FONT_MAX_SIZE 2000.0
|
||||
|
||||
struct THEBES_API gfxFontStyle {
|
||||
gfxFontStyle();
|
||||
gfxFontStyle(PRUint8 aStyle, PRUint16 aWeight, gfxFloat aSize,
|
||||
const nsACString& aLangGroup,
|
||||
float aSizeAdjust, PRPackedBool aSystemFont,
|
||||
|
|
|
@ -873,6 +873,15 @@ gfxFontGroup::MakeSpaceTextRun(const Parameters *aParams, PRUint32 aFlags)
|
|||
return textRun.forget();
|
||||
}
|
||||
|
||||
#define DEFAULT_PIXEL_FONT_SIZE 16.0f
|
||||
|
||||
gfxFontStyle::gfxFontStyle() :
|
||||
style(FONT_STYLE_NORMAL), systemFont(PR_TRUE), familyNameQuirks(PR_FALSE),
|
||||
weight(FONT_WEIGHT_NORMAL), size(DEFAULT_PIXEL_FONT_SIZE),
|
||||
langGroup(NS_LITERAL_CSTRING("x-western")), sizeAdjust(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
gfxFontStyle::gfxFontStyle(PRUint8 aStyle, PRUint16 aWeight, gfxFloat aSize,
|
||||
const nsACString& aLangGroup,
|
||||
float aSizeAdjust, PRPackedBool aSystemFont,
|
||||
|
|
Загрузка…
Ссылка в новой задаче