private FSFont resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant) { String normalizedFontFamily = normalizeFontFamily(fontFamily); String cacheKey = getHashName(normalizedFontFamily, weight, style); FontDescription result = (FontDescription)_fontCache.get(cacheKey); if (result != null) { return new ITextFSFont(result, size); } FontFamily family = (FontFamily)_fontFamilies.get(normalizedFontFamily); if (family != null) { result = family.match(convertWeightToInt(weight), style); if (result != null) { _fontCache.put(cacheKey, result); return new ITextFSFont(result, size); } } return null; }
private FSFont resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant) { String normalizedFontFamily = normalizeFontFamily(fontFamily); String cacheKey = getHashName(normalizedFontFamily, weight, style); FontDescription result = (FontDescription)_fontCache.get(cacheKey); if (result != null) { return new ITextFSFont(result, size); } FontFamily family = (FontFamily)_fontFamilies.get(normalizedFontFamily); if (family != null) { result = family.match(convertWeightToInt(weight), style); if (result != null) { _fontCache.put(cacheKey, result); return new ITextFSFont(result, size); } } return null; }
private FSFont resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant) { String normalizedFontFamily = normalizeFontFamily(fontFamily); String cacheKey = getHashName(normalizedFontFamily, weight, style); FontDescription result = (FontDescription)_fontCache.get(cacheKey); if (result != null) { return new ITextFSFont(result, size); } FontFamily family = (FontFamily)_fontFamilies.get(normalizedFontFamily); if (family != null) { result = family.match(convertWeightToInt(weight), style); if (result != null) { _fontCache.put(cacheKey, result); return new ITextFSFont(result, size); } } return null; }
private FSFont resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant) { String normalizedFontFamily = normalizeFontFamily(fontFamily); String cacheKey = getHashName(normalizedFontFamily, weight, style); FontDescription result = (FontDescription)_fontCache.get(cacheKey); if (result != null) { return new ITextFSFont(result, size); } FontFamily family = (FontFamily)_fontFamilies.get(normalizedFontFamily); if (family != null) { result = family.match(convertWeightToInt(weight), style); if (result != null) { _fontCache.put(cacheKey, result); return new ITextFSFont(result, size); } } return null; }
private FSFont resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant) { String normalizedFontFamily = normalizeFontFamily(fontFamily); String cacheKey = getHashName(normalizedFontFamily, weight, style); FontDescription result = (FontDescription)_fontCache.get(cacheKey); if (result != null) { return new ITextFSFont(result, size); } FontFamily family = (FontFamily)_fontFamilies.get(normalizedFontFamily); if (family != null) { result = family.match(convertWeightToInt(weight), style); if (result != null) { _fontCache.put(cacheKey, result); return new ITextFSFont(result, size); } } return null; }
descr.setWeight(convertWeightToInt(fontWeightOverride));
descr.setWeight(convertWeightToInt(fontWeightOverride));
descr.setWeight(convertWeightToInt(fontWeightOverride));
FontSpecification fontSpec = getFontSpecification(); if (fontSpec != null) { int need = ITextFontResolver.convertWeightToInt(fontSpec.fontWeight); int have = desc.getWeight();
FontSpecification fontSpec = getFontSpecification(); if (fontSpec != null) { int need = ITextFontResolver.convertWeightToInt(fontSpec.fontWeight); int have = desc.getWeight(); if (need > have) {
FontSpecification fontSpec = getFontSpecification(); if (fontSpec != null) { int need = ITextFontResolver.convertWeightToInt(fontSpec.fontWeight); int have = desc.getWeight();