font_fallback_win.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_GFX_FONT_FALLBACK_WIN_H_
  5. #define UI_GFX_FONT_FALLBACK_WIN_H_
  6. #include <stddef.h>
  7. #include <string>
  8. #include <vector>
  9. #include "ui/gfx/font.h"
  10. #include "ui/gfx/font_fallback.h"
  11. namespace gfx {
  12. // Internals of font_fallback_win.cc exposed for testing.
  13. namespace internal {
  14. // Parses comma separated SystemLink |entry|, per the format described here:
  15. // http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx
  16. //
  17. // Sets |filename| and |font_name| respectively. If a field is not present
  18. // or could not be parsed, the corresponding parameter will be cleared.
  19. void GFX_EXPORT ParseFontLinkEntry(const std::string& entry,
  20. std::string* filename,
  21. std::string* font_name);
  22. // Parses a font |family| in the format "FamilyFoo & FamilyBar (TrueType)".
  23. // Splits by '&' and strips off the trailing parenthesized expression.
  24. void GFX_EXPORT ParseFontFamilyString(const std::string& family,
  25. std::vector<std::string>* font_names);
  26. } // namespace internal
  27. } // namespace gfx
  28. #endif // UI_GFX_FONT_FALLBACK_WIN_H_