diff options
author | Ebrahim Byagowi <ebrahim@gnu.org> | 2018-04-11 18:00:13 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 18:00:13 +0430 |
commit | cb3fa70cd4c33e9f1c736f778cb3b606d15c0936 (patch) | |
tree | 978f1edeb3c4a7fbff935583f82e2fcee09c079c /src/hb-directwrite.cc | |
parent | 09d5e5468858f4403ce91aca46749397b23825d9 (diff) | |
download | harfbuzz-cb3fa70cd4c33e9f1c736f778cb3b606d15c0936.tar.gz |
[dwrite] Cosmetic change (#963)
Diffstat (limited to 'src/hb-directwrite.cc')
-rw-r--r-- | src/hb-directwrite.cc | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc index 3175fe05..01261891 100644 --- a/src/hb-directwrite.cc +++ b/src/hb-directwrite.cc @@ -1,4 +1,4 @@ -/* +/* * Copyright © 2015-2018 Ebrahim Byagowi * * This is part of HarfBuzz, a text shaping library. @@ -304,8 +304,8 @@ public: inline bool ContainsTextPosition (uint32_t aTextPosition) const { - return aTextPosition >= mTextStart - && aTextPosition < mTextStart + mTextLength; + return aTextPosition >= mTextStart && + aTextPosition < mTextStart + mTextLength; } Run *nextRun; @@ -485,11 +485,10 @@ protected: for (Run *run = &mRunHead; run; run = run->nextRun) if (run->ContainsTextPosition (textPosition)) { - mCurrentRun = run; - return; + mCurrentRun = run; + return; } - //NS_NOTREACHED ("We should always be able to find the text position in one \ - // of our runs"); + // NS_NOTREACHED ("We should always be able to find the text position in one of our runs"); } void SplitCurrentRun (uint32_t splitPosition) @@ -655,7 +654,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan, for (unsigned int i = 0; i < num_features; ++i) { typographic_features.features[i].nameTag = (DWRITE_FONT_FEATURE_TAG) - hb_uint32_swap (features[i].tag); + hb_uint32_swap (features[i].tag); typographic_features.features[i].parameter = features[i].value; } } @@ -760,27 +759,27 @@ retry_getglyphs: uint16_t* modifiedGlyphIndices = new uint16_t[maxGlyphCount]; float* modifiedGlyphAdvances = new float[maxGlyphCount]; DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets = - new DWRITE_GLYPH_OFFSET[maxGlyphCount]; + new DWRITE_GLYPH_OFFSET[maxGlyphCount]; uint32_t actualGlyphsCount; hr = analyzer1->GetJustifiedGlyphs (fontFace, fontEmSize, runHead->mScript, - textLength, glyphCount, maxGlyphCount, clusterMap, glyphIndices, - glyphAdvances, justifiedGlyphAdvances, justifiedGlyphOffsets, - glyphProperties, &actualGlyphsCount, modifiedClusterMap, modifiedGlyphIndices, - modifiedGlyphAdvances, modifiedGlyphOffsets); + textLength, glyphCount, maxGlyphCount, clusterMap, glyphIndices, + glyphAdvances, justifiedGlyphAdvances, justifiedGlyphOffsets, + glyphProperties, &actualGlyphsCount, modifiedClusterMap, modifiedGlyphIndices, + modifiedGlyphAdvances, modifiedGlyphOffsets); if (hr == HRESULT_FROM_WIN32 (ERROR_INSUFFICIENT_BUFFER)) { - maxGlyphCount = actualGlyphsCount; - delete [] modifiedGlyphIndices; - delete [] modifiedGlyphAdvances; - delete [] modifiedGlyphOffsets; + maxGlyphCount = actualGlyphsCount; + delete [] modifiedGlyphIndices; + delete [] modifiedGlyphAdvances; + delete [] modifiedGlyphOffsets; - maxGlyphCount = actualGlyphsCount; + maxGlyphCount = actualGlyphsCount; - goto retry_getjustifiedglyphs; + goto retry_getjustifiedglyphs; } if (FAILED (hr)) - FAIL ("Analyzer failed to get justified glyphs."); + FAIL ("Analyzer failed to get justified glyphs."); delete [] clusterMap; delete [] glyphIndices; |