Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GFX_FONTMISSINGGLYPHS_H
7 #define GFX_FONTMISSINGGLYPHS_H
9 #include "gfxTypes.h"
10 #include "gfxRect.h"
12 class gfxContext;
14 /**
15 * This class should not be instantiated. It's just a container
16 * for some helper functions.
17 */
18 class gfxFontMissingGlyphs {
19 public:
20 /**
21 * Draw hexboxes for a missing glyph.
22 * @param aContext the context to draw to
23 * @param aRect the glyph-box for the glyph that is missing
24 * @param aChar the UTF16 codepoint for the character
25 * @param aAppUnitsPerDevPixel the appUnits to devPixel ratio we're using,
26 * (so we can scale glyphs to a sensible size)
27 */
28 static void DrawMissingGlyph(gfxContext *aContext,
29 const gfxRect& aRect,
30 uint32_t aChar,
31 uint32_t aAppUnitsPerDevPixel);
32 /**
33 * @return the desired minimum width for a glyph-box that will allow
34 * the hexboxes to be drawn reasonably.
35 */
36 static gfxFloat GetDesiredMinWidth(uint32_t aChar,
37 uint32_t aAppUnitsPerDevUnit);
38 };
40 #endif