您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

EmbedFontInfo.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.fonts;
  18. import java.util.List;
  19. /**
  20. * FontInfo contains meta information on fonts (where is the metrics file etc.)
  21. */
  22. public class EmbedFontInfo {
  23. private String metricsFile, embedFile;
  24. private boolean kerning;
  25. private List fontTriplets;
  26. /**
  27. * Main constructor
  28. * @param metricsFile Path to the xml file containing font metrics
  29. * @param kerning True if kerning should be enabled
  30. * @param fontTriplets List of font triplets to associate with this font
  31. * @param embedFile Path to the embeddable font file (may be null)
  32. */
  33. public EmbedFontInfo(String metricsFile, boolean kerning,
  34. List fontTriplets, String embedFile) {
  35. this.metricsFile = metricsFile;
  36. this.embedFile = embedFile;
  37. this.kerning = kerning;
  38. this.fontTriplets = fontTriplets;
  39. }
  40. /**
  41. * Returns the path to the metrics file
  42. * @return the metrics file path
  43. */
  44. public String getMetricsFile() {
  45. return metricsFile;
  46. }
  47. /**
  48. * Returns the path to the embeddable font file
  49. * @return the font file path
  50. */
  51. public String getEmbedFile() {
  52. return embedFile;
  53. }
  54. /**
  55. * Determines if kerning is enabled
  56. * @return True if enabled
  57. */
  58. public boolean getKerning() {
  59. return kerning;
  60. }
  61. /**
  62. * Returns the list of font triplets associated with this font.
  63. * @return List of font triplets
  64. */
  65. public List getFontTriplets() {
  66. return fontTriplets;
  67. }
  68. }