mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1341490: Unified-build bustage fixes.
MozReview-Commit-ID: CTBa12qhMai --HG-- extra : rebase_source : e48409d3dcd38b95e567c823050a5633e89ed643
This commit is contained in:
parent
43fa40bb63
commit
17f71c7f9f
@ -336,9 +336,9 @@ gfxHarfBuzzShaper::GetGlyphHAdvance(hb_codepoint_t glyph) const
|
||||
// glyph must be valid now, because we checked during initialization
|
||||
// that mNumLongHMetrics is > 0, and that the metrics table is large enough
|
||||
// to contain mNumLongHMetrics records
|
||||
const GlyphMetrics* metrics =
|
||||
reinterpret_cast<const GlyphMetrics*>(hb_blob_get_data(mHmtxTable,
|
||||
nullptr));
|
||||
const ::GlyphMetrics* metrics =
|
||||
reinterpret_cast<const ::GlyphMetrics*>(hb_blob_get_data(mHmtxTable,
|
||||
nullptr));
|
||||
return FloatToFixed(mFont->FUnitsToDevUnitsFactor() *
|
||||
uint16_t(metrics->metrics[glyph].advanceWidth));
|
||||
}
|
||||
@ -362,9 +362,9 @@ gfxHarfBuzzShaper::GetGlyphVAdvance(hb_codepoint_t glyph) const
|
||||
// glyph must be valid now, because we checked during initialization
|
||||
// that mNumLongVMetrics is > 0, and that the metrics table is large enough
|
||||
// to contain mNumLongVMetrics records
|
||||
const GlyphMetrics* metrics =
|
||||
reinterpret_cast<const GlyphMetrics*>(hb_blob_get_data(mVmtxTable,
|
||||
nullptr));
|
||||
const ::GlyphMetrics* metrics =
|
||||
reinterpret_cast<const ::GlyphMetrics*>(hb_blob_get_data(mVmtxTable,
|
||||
nullptr));
|
||||
return FloatToFixed(mFont->FUnitsToDevUnitsFactor() *
|
||||
uint16_t(metrics->metrics[glyph].advanceWidth));
|
||||
}
|
||||
@ -465,8 +465,8 @@ gfxHarfBuzzShaper::GetGlyphVOrigin(hb_codepoint_t aGlyph,
|
||||
return;
|
||||
}
|
||||
|
||||
const GlyphMetrics* metrics =
|
||||
reinterpret_cast<const GlyphMetrics*>
|
||||
const ::GlyphMetrics* metrics =
|
||||
reinterpret_cast<const ::GlyphMetrics*>
|
||||
(hb_blob_get_data(mVmtxTable, nullptr));
|
||||
int16_t lsb;
|
||||
if (aGlyph < hb_codepoint_t(mNumLongVMetrics)) {
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "harfbuzz/hb.h"
|
||||
#include "harfbuzz/hb-ot.h"
|
||||
|
||||
#define FloatToFixed(f) (65536 * (f))
|
||||
#define FixedToFloat(f) ((f) * (1.0 / 65536.0))
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "nsCharTraits.h"
|
||||
#include "harfbuzz/hb.h"
|
||||
|
||||
using namespace mozilla::unicode;
|
||||
|
||||
#define MOD(sp) ((sp) % PAREN_STACK_DEPTH)
|
||||
#define LIMIT_INC(sp) (((sp) < PAREN_STACK_DEPTH)? (sp) + 1 : PAREN_STACK_DEPTH)
|
||||
#define INC(sp,count) (MOD((sp) + (count)))
|
||||
|
Loading…
Reference in New Issue
Block a user