diff --git a/metainfo.xml b/metainfo.xml index da10ee64dc..5c7515da21 100644 --- a/metainfo.xml +++ b/metainfo.xml @@ -113,6 +113,7 @@
  • Add generation of config file from internal state (#1282)
  • Add SGRSAVE and SGRRESTORE VT sequences to save and restore SGR state (They intentionally conflict with XTPUSHSGR and XTPOPSGR)
  • Update of contour.desktop file (#1423)
  • +
  • Fixed overlap of glyphs for long codepoints (#1349)
  • Fixed too verbose info during ssh session login (#1447)
  • Fixes corruption of sixel image on high resolution (#1049)
  • Fixes bad wording of OS/X to macOS (#1462)
  • diff --git a/src/text_shaper/open_shaper.cpp b/src/text_shaper/open_shaper.cpp index 3c92082629..c060ad30bc 100644 --- a/src/text_shaper/open_shaper.cpp +++ b/src/text_shaper/open_shaper.cpp @@ -389,6 +389,7 @@ namespace gpos.presentation = presentation; result.emplace_back(gpos); } + return crispy::none_of(result, glyphMissing); } } // namespace diff --git a/src/vtrasterizer/TextRenderer.cpp b/src/vtrasterizer/TextRenderer.cpp index 3fdf47bd0d..51a562e4a0 100644 --- a/src/vtrasterizer/TextRenderer.cpp +++ b/src/vtrasterizer/TextRenderer.cpp @@ -582,7 +582,6 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, text::shape_result const& glyphPositions = getOrCreateCachedGlyphPositions(hash, codepoints, clusters, style); crispy::point pen = _gridMetrics.mapBottomLeft(initialPenPosition); - auto const advanceX = unbox(_gridMetrics.cellSize.width); for (auto const& glyphPosition: glyphPositions) { @@ -590,7 +589,7 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, { auto const pen1 = applyGlyphPositionToPen(pen, *attributes, glyphPosition); renderRasterizedGlyph(pen1, color, *attributes); - pen.x += static_cast(advanceX); + pen.x += unbox(_gridMetrics.cellSize.width); continue; } @@ -617,10 +616,14 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, if (glyphPosition.advance.x) { + + auto numberOfCellsToAdvance = + std::rint(glyphPosition.advance.x / unbox(_gridMetrics.cellSize.width)); // Only advance horizontally, as we're (guess what) a terminal. :-) // Only advance in fixed-width steps. - // Only advance iff there harfbuzz told us to. - pen.x += static_cast(advanceX); + // Only advance if there harfbuzz told us to. + pen.x += + static_cast(numberOfCellsToAdvance * (unbox(_gridMetrics.cellSize.width))); } } }