PolyFontManager.h 638 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * PolyFontManager.h
  3. * Poly
  4. *
  5. * Created by Ivan Safrin on 3/3/10.
  6. * Copyright 2010 Ivan Safrin. All rights reserved.
  7. *
  8. */
  9. // @package Services
  10. #pragma once
  11. #include "PolyString.h"
  12. #include "PolyGlobals.h"
  13. #include "PolyFont.h"
  14. #include <vector>
  15. #include <string>
  16. using std::vector;
  17. using std::string;
  18. namespace Polycode {
  19. class FontEntry {
  20. public:
  21. String fontName;
  22. Font *font;
  23. };
  24. class _PolyExport FontManager {
  25. public:
  26. FontManager();
  27. ~FontManager();
  28. void registerFont(String fontName, String fontPath);
  29. Font *getFontByName(String fontName);
  30. private:
  31. vector <FontEntry> fonts;
  32. };
  33. }