2
0

IGUIFontBitmap.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #pragma once
  5. #include "IGUIFont.h"
  6. namespace irr
  7. {
  8. namespace gui
  9. {
  10. class IGUISpriteBank;
  11. //! Font interface.
  12. class IGUIFontBitmap : public IGUIFont
  13. {
  14. public:
  15. //! Returns the type of this font
  16. EGUI_FONT_TYPE getType() const override { return EGFT_BITMAP; }
  17. //! returns the parsed Symbol Information
  18. virtual IGUISpriteBank *getSpriteBank() const = 0;
  19. //! returns the sprite number from a given character
  20. virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0;
  21. //! Gets kerning values (distance between letters) for the font. If no parameters are provided,
  22. /** the global kerning distance is returned.
  23. \param thisLetter: If this parameter is provided, the left side kerning for this letter is added
  24. to the global kerning value. For example, a space might only be one pixel wide, but it may
  25. be displayed as several pixels.
  26. \param previousLetter: If provided, kerning is calculated for both letters and added to the global
  27. kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the
  28. left side kerning value of thisLetter, then add the global value.
  29. */
  30. s32 getKerningWidth(const wchar_t *thisLetter = 0, const wchar_t *previousLetter = 0) const override = 0;
  31. };
  32. } // end namespace gui
  33. } // end namespace irr