386 */
387 if (xFontDirsMap == null) {
388 xFontDirsMap = new HashMap<>();
389 }
390 xFontDirsMap.put(fontID, path);
391 fullPath = file.getCanonicalPath();
392 } catch (IOException e) {
393 fullPath = path + File.separator + fileName;
394 }
395 Vector<String> xVal = xlfdMap.get(fullPath);
396 if (FontUtilities.debugFonts()) {
397 FontUtilities.getLogger()
398 .info("fullPath=" + fullPath +
399 " xVal=" + xVal);
400 }
401 if ((xVal == null || !xVal.contains(fontPart)) &&
402 (sVal == null) || !sVal.startsWith("/")) {
403 if (FontUtilities.debugFonts()) {
404 FontUtilities.getLogger()
405 .info("Map fontID:"+fontID +
406 "to file:" + fullPath);
407 }
408 fontNameMap.put(fontID, fullPath);
409 if (xVal == null) {
410 xVal = new Vector<>();
411 xlfdMap.put (fullPath, xVal);
412 }
413 xVal.add(fontPart);
414 }
415
416 ttype = st.nextToken();
417 if (ttype != StreamTokenizer.TT_EOL) {
418 break;
419 }
420 }
421 }
422 }
423 fr.close();
424 }
425 } catch (IOException ioe1) {
426 } finally {
|
386 */
387 if (xFontDirsMap == null) {
388 xFontDirsMap = new HashMap<>();
389 }
390 xFontDirsMap.put(fontID, path);
391 fullPath = file.getCanonicalPath();
392 } catch (IOException e) {
393 fullPath = path + File.separator + fileName;
394 }
395 Vector<String> xVal = xlfdMap.get(fullPath);
396 if (FontUtilities.debugFonts()) {
397 FontUtilities.getLogger()
398 .info("fullPath=" + fullPath +
399 " xVal=" + xVal);
400 }
401 if ((xVal == null || !xVal.contains(fontPart)) &&
402 (sVal == null) || !sVal.startsWith("/")) {
403 if (FontUtilities.debugFonts()) {
404 FontUtilities.getLogger()
405 .info("Map fontID:"+fontID +
406 " to file:" + fullPath);
407 }
408 fontNameMap.put(fontID, fullPath);
409 if (xVal == null) {
410 xVal = new Vector<>();
411 xlfdMap.put (fullPath, xVal);
412 }
413 xVal.add(fontPart);
414 }
415
416 ttype = st.nextToken();
417 if (ttype != StreamTokenizer.TT_EOL) {
418 break;
419 }
420 }
421 }
422 }
423 fr.close();
424 }
425 } catch (IOException ioe1) {
426 } finally {
|