IGUIFontBitmap.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_GUI_FONT_BITMAP_H_INCLUDED
  5. #define IRR_I_GUI_FONT_BITMAP_H_INCLUDED
  6. #include "IGUIFont.h"
  7. namespace irr
  8. {
  9. namespace gui
  10. {
  11. class IGUISpriteBank;
  12. //! Font interface.
  13. class IGUIFontBitmap : public IGUIFont
  14. {
  15. public:
  16. //! Returns the type of this font
  17. virtual EGUI_FONT_TYPE getType() const IRR_OVERRIDE { return EGFT_BITMAP; }
  18. //! returns the parsed Symbol Information
  19. virtual IGUISpriteBank* getSpriteBank() const = 0;
  20. //! returns the sprite number from a given character
  21. virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0;
  22. //! Gets kerning values (distance between letters) for the font. If no parameters are provided,
  23. /** the global kerning distance is returned.
  24. \param thisLetter: If this parameter is provided, the left side kerning for this letter is added
  25. to the global kerning value. For example, a space might only be one pixel wide, but it may
  26. be displayed as several pixels.
  27. \param previousLetter: If provided, kerning is calculated for both letters and added to the global
  28. kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the
  29. left side kerning value of thisLetter, then add the global value.
  30. */
  31. virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const IRR_OVERRIDE = 0;
  32. };
  33. } // end namespace gui
  34. } // end namespace irr
  35. #endif