You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FontEventListener.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.fonts;
  19. /**
  20. * Event listener interface for font-related events.
  21. */
  22. public interface FontEventListener {
  23. /**
  24. * Notifies about a font being substituted as the requested one isn't available.
  25. * @param source the event source
  26. * @param requested the requested font triplet
  27. * @param effective the effective font triplet
  28. */
  29. void fontSubstituted(Object source, FontTriplet requested, FontTriplet effective);
  30. /**
  31. * An error occurred while loading a font for auto-detection.
  32. * @param source the event source
  33. * @param fontURL the font URL
  34. * @param e the original exception
  35. */
  36. void fontLoadingErrorAtAutoDetection(Object source, String fontURL, Exception e);
  37. /**
  38. * A glyph has been requested that is not available in the font.
  39. * @param source the event source
  40. * @param ch the character for which the glyph isn't available
  41. * @param fontName the name of the font
  42. */
  43. void glyphNotAvailable(Object source, char ch, String fontName);
  44. /**
  45. * An error occurred trying to find the font directory specified in the config file.
  46. * @param source the event source
  47. * @param dir the directory in the config file
  48. */
  49. void fontDirectoryNotFound(Object source, String dir);
  50. }