/** * This will get the table for the given tag. * * @param tag the name of the table to be returned * @return The table with the given tag. * @throws IOException if there was an error reading the table. */ protected TTFTable getTable(String tag) throws IOException { // after the initial parsing of the ttf there aren't any write operations // to the HashMap anymore, so that we don't have to synchronize the read access TTFTable ttfTable = tables.get(tag); if (ttfTable != null) { if (!ttfTable.initialized) { synchronized (lockReadtable) { if (!ttfTable.initialized) { readTable(ttfTable); } } } } return ttfTable; }
font.readTable(table);
/** * This will get the table for the given tag. * * @param tag the name of the table to be returned * @return The table with the given tag. * @throws IOException if there was an error reading the table. */ protected TTFTable getTable(String tag) throws IOException { // after the initial parsing of the ttf there aren't any write operations // to the HashMap anymore, so that we don't have to synchronize the read access TTFTable ttfTable = tables.get(tag); if (ttfTable != null) { if (!ttfTable.initialized) { synchronized (lockReadtable) { if (!ttfTable.initialized) { readTable(ttfTable); } } } } return ttfTable; }
/** * This will get the table for the given tag. * * @param tag the name of the table to be returned * @return The table with the given tag. * @throws IOException if there was an error reading the table. */ protected synchronized TTFTable getTable(String tag) throws IOException { TTFTable ttfTable = tables.get(tag); if (ttfTable != null && !ttfTable.getInitialized()) { readTable(ttfTable); } return ttfTable; }
font.readTable(table);
font.readTable(table);