String f = null;
int newWeight = weight;
if (newWeight < 400) {
- while (f == null && newWeight > 0) {
+ while (f == null && newWeight > 100) {
newWeight -= 100;
key = createFontKey(family, style, newWeight);
f = getInternalFontKey(key);
}
+ newWeight = weight;
+ while (f == null && newWeight < 400) {
+ newWeight += 100;
+ key = createFontKey(family, style, newWeight);
+ f = getInternalFontKey(key);
+ }
} else if (newWeight == 500) {
key = createFontKey(family, style, 400);
f = getInternalFontKey(key);