1 |
# HG changeset patch |
2 |
# User Jonathan Kew <jkew@mozilla.com> |
3 |
# Date 1452675061 0 |
4 |
# Wed Jan 13 08:51:01 2016 +0000 |
5 |
# Node ID cf699e95e98829b465b64a7e0281d95ec851ce8c |
6 |
# Parent 3c9f357598e86c2f593e9895d5725bf3498f8f5a |
7 |
Bug 1228540 - pt 2 - Remove our HBGetGlyphHOrigin callback, as the default behavior is sufficient. |
8 |
|
9 |
diff --git a/gfx/thebes/gfxHarfBuzzShaper.cpp b/gfx/thebes/gfxHarfBuzzShaper.cpp |
10 |
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp |
11 |
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp |
12 |
@@ -349,27 +349,16 @@ gfxHarfBuzzShaper::HBGetGlyphVAdvance(hb |
13 |
static_cast<const gfxHarfBuzzShaper::FontCallbackData*>(font_data); |
14 |
// Currently, we don't offer gfxFont subclasses a method to override this |
15 |
// and provide hinted platform-specific vertical advances (analogous to the |
16 |
// GetGlyphWidth method for horizontal advances). If that proves necessary, |
17 |
// we'll add a new gfxFont method and call it from here. |
18 |
return fcd->mShaper->GetGlyphVAdvance(glyph); |
19 |
} |
20 |
|
21 |
-/* static */ |
22 |
-hb_bool_t |
23 |
-gfxHarfBuzzShaper::HBGetGlyphHOrigin(hb_font_t *font, void *font_data, |
24 |
- hb_codepoint_t glyph, |
25 |
- hb_position_t *x, hb_position_t *y, |
26 |
- void *user_data) |
27 |
-{ |
28 |
- // We work in horizontal coordinates, so no origin adjustment needed here. |
29 |
- return true; |
30 |
-} |
31 |
- |
32 |
struct VORG { |
33 |
AutoSwap_PRUint16 majorVersion; |
34 |
AutoSwap_PRUint16 minorVersion; |
35 |
AutoSwap_PRInt16 defaultVertOriginY; |
36 |
AutoSwap_PRUint16 numVertOriginYMetrics; |
37 |
}; |
38 |
|
39 |
struct VORGrec { |
40 |
@@ -1262,19 +1251,16 @@ gfxHarfBuzzShaper::Initialize() |
41 |
hb_font_funcs_set_glyph_func(sHBFontFuncs, HBGetGlyph, |
42 |
nullptr, nullptr); |
43 |
hb_font_funcs_set_glyph_h_advance_func(sHBFontFuncs, |
44 |
HBGetGlyphHAdvance, |
45 |
nullptr, nullptr); |
46 |
hb_font_funcs_set_glyph_v_advance_func(sHBFontFuncs, |
47 |
HBGetGlyphVAdvance, |
48 |
nullptr, nullptr); |
49 |
- hb_font_funcs_set_glyph_h_origin_func(sHBFontFuncs, |
50 |
- HBGetGlyphHOrigin, |
51 |
- nullptr, nullptr); |
52 |
hb_font_funcs_set_glyph_v_origin_func(sHBFontFuncs, |
53 |
HBGetGlyphVOrigin, |
54 |
nullptr, nullptr); |
55 |
hb_font_funcs_set_glyph_extents_func(sHBFontFuncs, |
56 |
HBGetGlyphExtents, |
57 |
nullptr, nullptr); |
58 |
hb_font_funcs_set_glyph_contour_point_func(sHBFontFuncs, |
59 |
HBGetContourPoint, |
60 |
diff --git a/gfx/thebes/gfxHarfBuzzShaper.h b/gfx/thebes/gfxHarfBuzzShaper.h |
61 |
--- a/gfx/thebes/gfxHarfBuzzShaper.h |
62 |
+++ b/gfx/thebes/gfxHarfBuzzShaper.h |
63 |
@@ -56,21 +56,16 @@ public: |
64 |
hb_codepoint_t glyph, void *user_data); |
65 |
|
66 |
// get harfbuzz vertical advance in 16.16 fixed point format. |
67 |
static hb_position_t |
68 |
HBGetGlyphVAdvance(hb_font_t *font, void *font_data, |
69 |
hb_codepoint_t glyph, void *user_data); |
70 |
|
71 |
static hb_bool_t |
72 |
- HBGetGlyphHOrigin(hb_font_t *font, void *font_data, |
73 |
- hb_codepoint_t glyph, |
74 |
- hb_position_t *x, hb_position_t *y, |
75 |
- void *user_data); |
76 |
- static hb_bool_t |
77 |
HBGetGlyphVOrigin(hb_font_t *font, void *font_data, |
78 |
hb_codepoint_t glyph, |
79 |
hb_position_t *x, hb_position_t *y, |
80 |
void *user_data); |
81 |
|
82 |
hb_position_t GetHKerning(uint16_t aFirstGlyph, |
83 |
uint16_t aSecondGlyph) const; |
84 |
|