SkinUtils.cpp 849 B

1234567891011121314151617181920212223242526272829303132
  1. #include "main.h"
  2. #define WA_DLG_IMPLEMENT
  3. #include "wa_dlg.h"
  4. const char *GetFontName()
  5. {
  6. if (config_custom_plfont && *playlist_custom_font)
  7. return playlist_custom_font;
  8. if (!Skin_PLFont[0])
  9. {
  10. static char lang_font[128]; // benski> this is thread-safe because the language pack won't change (changing lang packs requires winamp restart)
  11. return getString(IDS_PLFONT, lang_font, 128);
  12. }
  13. return Skin_PLFont;
  14. }
  15. const wchar_t *GetFontNameW()
  16. {
  17. if (config_custom_plfont && *playlist_custom_fontW)
  18. return playlist_custom_fontW;
  19. if (!Skin_PLFontW[0])
  20. {
  21. static wchar_t lang_fontW[128]; // benski> this is thread-safe because the language pack won't change (changing lang packs requires winamp restart)
  22. return getStringW(IDS_PLFONT, lang_fontW, 128);
  23. }
  24. return Skin_PLFontW;
  25. }
  26. int GetFontSize()
  27. {
  28. return ScaleY(config_pe_fontsize);
  29. }