55 algoStyle = true; 56 if ((desc.style & Font.BOLD) == Font.BOLD && 57 ((compFont.style & Font.BOLD) == 0)) { 58 boldness = 1.33f; 59 } 60 if ((desc.style & Font.ITALIC) == Font.ITALIC && 61 (compFont.style & Font.ITALIC) == 0) { 62 italic = 0.7f; 63 } 64 } 65 strikes = new PhysicalStrike[compFont.numSlots]; 66 } 67 68 /* do I need this (see Strike::compositeStrikeForGlyph) */ 69 PhysicalStrike getStrikeForGlyph(int glyphCode) { 70 return getStrikeForSlot(glyphCode >>> 24); 71 } 72 73 PhysicalStrike getStrikeForSlot(int slot) { 74 75 PhysicalStrike strike = strikes[slot]; 76 if (strike == null) { 77 strike = 78 (PhysicalStrike)(compFont.getSlotFont(slot).getStrike(desc)); 79 80 strikes[slot] = strike; 81 } 82 return strike; 83 } 84 85 public int getNumGlyphs() { 86 return compFont.getNumGlyphs(); 87 } 88 89 StrikeMetrics getFontMetrics() { 90 if (strikeMetrics == null) { 91 StrikeMetrics compMetrics = new StrikeMetrics(); 92 for (int s=0; s<compFont.numMetricsSlots; s++) { 93 compMetrics.merge(getStrikeForSlot(s).getFontMetrics()); 94 } | 55 algoStyle = true; 56 if ((desc.style & Font.BOLD) == Font.BOLD && 57 ((compFont.style & Font.BOLD) == 0)) { 58 boldness = 1.33f; 59 } 60 if ((desc.style & Font.ITALIC) == Font.ITALIC && 61 (compFont.style & Font.ITALIC) == 0) { 62 italic = 0.7f; 63 } 64 } 65 strikes = new PhysicalStrike[compFont.numSlots]; 66 } 67 68 /* do I need this (see Strike::compositeStrikeForGlyph) */ 69 PhysicalStrike getStrikeForGlyph(int glyphCode) { 70 return getStrikeForSlot(glyphCode >>> 24); 71 } 72 73 PhysicalStrike getStrikeForSlot(int slot) { 74 75 if (slot >= strikes.length) { 76 slot = 0; 77 } 78 79 PhysicalStrike strike = strikes[slot]; 80 if (strike == null) { 81 strike = 82 (PhysicalStrike)(compFont.getSlotFont(slot).getStrike(desc)); 83 84 strikes[slot] = strike; 85 } 86 return strike; 87 } 88 89 public int getNumGlyphs() { 90 return compFont.getNumGlyphs(); 91 } 92 93 StrikeMetrics getFontMetrics() { 94 if (strikeMetrics == null) { 95 StrikeMetrics compMetrics = new StrikeMetrics(); 96 for (int s=0; s<compFont.numMetricsSlots; s++) { 97 compMetrics.merge(getStrikeForSlot(s).getFontMetrics()); 98 } |