mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1029307 - use fixed subscript/superscript offset ratio instead of font metric values. r=heycam
This commit is contained in:
parent
fdf20b7313
commit
c0310a0a41
@ -162,13 +162,15 @@ nsFontMetrics::XHeight()
|
|||||||
nscoord
|
nscoord
|
||||||
nsFontMetrics::SuperscriptOffset()
|
nsFontMetrics::SuperscriptOffset()
|
||||||
{
|
{
|
||||||
return ROUND_TO_TWIPS(GetMetrics().superscriptOffset);
|
return ROUND_TO_TWIPS(GetMetrics().emHeight *
|
||||||
|
NS_FONT_SUPERSCRIPT_OFFSET_RATIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
nscoord
|
nscoord
|
||||||
nsFontMetrics::SubscriptOffset()
|
nsFontMetrics::SubscriptOffset()
|
||||||
{
|
{
|
||||||
return ROUND_TO_TWIPS(GetMetrics().subscriptOffset);
|
return ROUND_TO_TWIPS(GetMetrics().emHeight *
|
||||||
|
NS_FONT_SUBSCRIPT_OFFSET_RATIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -196,4 +196,8 @@ enum {
|
|||||||
#define NS_FONT_VARIANT_POSITION_SUPER 1
|
#define NS_FONT_VARIANT_POSITION_SUPER 1
|
||||||
#define NS_FONT_VARIANT_POSITION_SUB 2
|
#define NS_FONT_VARIANT_POSITION_SUB 2
|
||||||
|
|
||||||
|
// based on fixed offset values used within WebKit
|
||||||
|
#define NS_FONT_SUBSCRIPT_OFFSET_RATIO (0.20)
|
||||||
|
#define NS_FONT_SUPERSCRIPT_OFFSET_RATIO (0.34)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user