nsFontFace.h 862 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef __nsFontFace_h__
  5. #define __nsFontFace_h__
  6. #include "nsIDOMFontFace.h"
  7. class gfxFontEntry;
  8. class gfxFontGroup;
  9. class nsFontFace : public nsIDOMFontFace
  10. {
  11. public:
  12. NS_DECL_ISUPPORTS
  13. NS_DECL_NSIDOMFONTFACE
  14. nsFontFace(gfxFontEntry* aFontEntry,
  15. gfxFontGroup* aFontGroup,
  16. uint8_t aMatchInfo);
  17. gfxFontEntry* GetFontEntry() const { return mFontEntry.get(); }
  18. void AddMatchType(uint8_t aMatchType) {
  19. mMatchType |= aMatchType;
  20. }
  21. protected:
  22. virtual ~nsFontFace();
  23. RefPtr<gfxFontEntry> mFontEntry;
  24. RefPtr<gfxFontGroup> mFontGroup;
  25. uint8_t mMatchType;
  26. };
  27. #endif // __nsFontFace_h__