gfx/thebes/gfxFontMissingGlyphs.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial