font.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* -*- mode: c; tab-width: 4; c-basic-offset: 3; c-file-style: "linux" -*- */
  2. //
  3. // Copyright (c) 2009, Wei Mingzhi <whistler_wmz@users.sf.net>.
  4. // All rights reserved.
  5. //
  6. // This file is part of SDLPAL.
  7. //
  8. // SDLPAL is free software: you can redistribute it and/or modify
  9. // it under the terms of the GNU General Public License as published by
  10. // the Free Software Foundation, either version 3 of the License, or
  11. // (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. //
  21. // Modified by Lou Yihua <louyihua@21cn.com> with Unicode support, 2015
  22. //
  23. #ifndef FONT_H
  24. #define FONT_H
  25. #include "common.h"
  26. #include "palcommon.h"
  27. PAL_C_LINKAGE_BEGIN
  28. INT
  29. PAL_InitEmbeddedFont(
  30. VOID
  31. );
  32. INT
  33. PAL_LoadBdfFont(
  34. LPCSTR pszBdfFileName
  35. );
  36. VOID
  37. PAL_FreeFont(
  38. VOID
  39. );
  40. VOID
  41. PAL_DrawCharOnSurface(
  42. WORD wChar,
  43. SDL_Surface *lpSurface,
  44. PAL_POS pos,
  45. BYTE bColor,
  46. BOOL fUse8x8Font
  47. );
  48. INT
  49. PAL_CharWidth(
  50. WORD wChar
  51. );
  52. INT
  53. PAL_FontHeight(
  54. VOID
  55. );
  56. PAL_C_LINKAGE_END
  57. #endif