modules/graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java

Print this page




1201         }
1202 
1203         float[] metrics = new float[METRICS_TOTAL];
1204         for (int i = 0; i < METRICS_TOTAL; i++) {
1205             metrics[i] = styleMetrics[i] * ptSize;
1206         }
1207 
1208         return metrics;
1209     }
1210 
1211     byte[] getTableBytes(int tag) {
1212         Buffer buffer = readTable(tag);
1213         byte[] table = null;
1214         if(buffer != null){
1215             table = new byte[buffer.capacity()];
1216             buffer.get(0, table, 0, buffer.capacity());
1217         }
1218         return table;
1219     }
1220 
















1221 }


1201         }
1202 
1203         float[] metrics = new float[METRICS_TOTAL];
1204         for (int i = 0; i < METRICS_TOTAL; i++) {
1205             metrics[i] = styleMetrics[i] * ptSize;
1206         }
1207 
1208         return metrics;
1209     }
1210 
1211     byte[] getTableBytes(int tag) {
1212         Buffer buffer = readTable(tag);
1213         byte[] table = null;
1214         if(buffer != null){
1215             table = new byte[buffer.capacity()];
1216             buffer.get(0, table, 0, buffer.capacity());
1217         }
1218         return table;
1219     }
1220 
1221     @Override
1222     public boolean equals(Object obj) {
1223         if (obj == null) {
1224             return false;
1225         }
1226         if (!(obj instanceof PrismFontFile)) {
1227             return false;
1228         }
1229         final PrismFontFile other = (PrismFontFile)obj;
1230         return filename.equals(other.filename);
1231     }
1232 
1233     @Override
1234     public int hashCode() {
1235         return filename.hashCode();
1236     }
1237 }