MCPcopy Create free account
hub / github.com/apache/xmlgraphics-fop / mapChar

Method mapChar

fop-core/src/main/java/org/apache/fop/fonts/Font.java:233–249  ·  view source on GitHub ↗

Map a java character (unicode) to a font character. Default uses CodePointMapping. @param c character to map @return the mapped character

(char c)

Source from the content-addressed store, hash-verified

231 * @return the mapped character
232 */
233 public char mapChar(char c) {
234
235 if (metric instanceof org.apache.fop.fonts.Typeface) {
236 return ((org.apache.fop.fonts.Typeface)metric).mapChar(c);
237 }
238
239 // Use default CodePointMapping
240 char d = CodePointMapping.getMapping("WinAnsiEncoding").mapChar(c);
241 if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
242 c = d;
243 } else {
244 log.warn("Glyph " + (int) c + " not available in font " + fontName);
245 c = Typeface.NOT_FOUND;
246 }
247
248 return c;
249 }
250
251 /**
252 * Map a unicode code point to a font character.

Callers 11

mockFontMethod · 0.95
mockFontMethod · 0.95
getNextKnuthElementsMethod · 0.95
drawTextWithDXMethod · 0.95
drawTextWithDPMethod · 0.95
drawTextNativeMethod · 0.95
drawTextUsingSoftFontMethod · 0.95
mapCodePointMethod · 0.95
getCharWidthMethod · 0.95
drawStringMethod · 0.95

Calls 1

mapCharMethod · 0.65

Tested by 2

mockFontMethod · 0.76
mockFontMethod · 0.76