mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't return values outside the range for PangoWeight (100..900). b=335543 r+sr=vladimir
This commit is contained in:
parent
0eb40f4042
commit
5b1d81411b
@ -332,7 +332,7 @@ ThebesStyleToPangoWeight (const gfxFontStyle *fs)
|
||||
baseWeight = 9;
|
||||
|
||||
/* Map from weight value to fcWeights index */
|
||||
static int fcWeightLookup[10] = {
|
||||
static const int fcWeightLookup[10] = {
|
||||
0, 0, 0, 0, 1, 1, 2, 3, 3, 4,
|
||||
};
|
||||
|
||||
@ -350,12 +350,12 @@ ThebesStyleToPangoWeight (const gfxFontStyle *fs)
|
||||
fcWeight = 4;
|
||||
|
||||
/* Map to final PANGO_WEIGHT value */
|
||||
static int fcWeights[5] = {
|
||||
static const int fcWeights[5] = {
|
||||
349,
|
||||
499,
|
||||
649,
|
||||
749,
|
||||
999
|
||||
900
|
||||
};
|
||||
|
||||
return (PangoWeight)fcWeights[fcWeight];
|
||||
|
Loading…
Reference in New Issue
Block a user