public abstract class FontCharactersMerger extends Object
Declares functionality to merge fonts of different types. Fonts pair is needed for merge operation. One font from this pair is considered as primary. It means that many characteristics, related to final merged font, such as metrics, encoding structure and others, will be taken from this primary font. Another font from this pair (secondary) provides only glyphs for final merged font.
| Modifier and Type | Method and Description |
|---|---|
abstract Font |
getPrimaryFont()
Gets primary font.
|
abstract Font |
getSecondaryFont()
Gets secondary font.
|
abstract Font |
mergeFonts(GlyphId[] primaryFontGlyphs,
GlyphId[] secondaryFontGlyphs,
String newFontName)
Merges fonts based on glyphs lists passed.
|
abstract Font |
mergeFonts(int[] primaryFontCharCodes,
int[] secondaryFontCharCodes,
String newFontName)
Merges fonts based on character codes lists passed.
|
abstract Font |
mergeFonts(Map<Integer,GlyphId> primaryFontDict,
Map<Integer,GlyphId> secondaryFontDict,
String newFontName)
This method version is designed for cases when you want to set character codes for glyphs in the resultant font explicitly.
|
public abstract Font getPrimaryFont()
Gets primary font.
public abstract Font getSecondaryFont()
Gets secondary font.
public abstract Font mergeFonts(GlyphId[] primaryFontGlyphs, GlyphId[] secondaryFontGlyphs, String newFontName)
Merges fonts based on glyphs lists passed. Searches for a character code for every glyph passed and adds found character code with correspondent glyph into resultant new font.
primaryFontGlyphs - List of glyphs to take from primary font.secondaryFontGlyphs - List of glyphs to take from secondary font.newFontName - Desired name for resultant font.public abstract Font mergeFonts(int[] primaryFontCharCodes, int[] secondaryFontCharCodes, String newFontName)
mergeFonts(new uint[] { 'A', 'B' }, new uint[] { 'C', 'D' }, "NewFont")primaryFontCharCodes - Codes to take from the primary font.secondaryFontCharCodes - Codes to take from the secondary font.newFontName - Desired name for the resultant font.public abstract Font mergeFonts(Map<Integer,GlyphId> primaryFontDict, Map<Integer,GlyphId> secondaryFontDict, String newFontName)
primaryFontDict - Dictionary with pairs [symbol code, glyph identifier] from the primary font.secondaryFontDict - Dictionary with pairs [symbol code, glyph identifier] from the secondary font.newFontName - Desired name for the resultant font.Copyright © 2025 Aspose. All Rights Reserved.