Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fix GuiRenderLigatures for OperatorMono #781

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jgehrig
Copy link
Collaborator

@jgehrig jgehrig commented Oct 22, 2020

Issue #771: Operator Mono Font Not Working

The Operator Mono font uses a different encoding scheme than Fira Code. For Fira Code, each character maps has a glyph in QGlyphRun. For Operator Mono, a ligature maps to a single glyph. I did not expect or observe this, so the logic was not tolerant of such an encoding scheme.

Operator Mono also has some monospace positioning irregularities: each character is not exactly the same width. Ligatures may may be slightly larger or smaller than their atomic parts/characters.

@jgehrig
Copy link
Collaborator Author

jgehrig commented Oct 22, 2020

This still needs some code cleanup.

I am not aware of any outstanding issues, but I have only done limited testing.

@codecov-io
Copy link

Codecov Report

Merging #781 (c493d79) into master (3910b09) will increase coverage by 0.46%.
The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #781      +/-   ##
==========================================
+ Coverage   21.17%   21.63%   +0.46%     
==========================================
  Files          73       74       +1     
  Lines       28151    28285     +134     
==========================================
+ Hits         5961     6120     +159     
+ Misses      22190    22165      -25     
Impacted Files Coverage Δ
src/gui/shellwidget/shellwidget.h 75.00% <ø> (ø)
src/gui/shellwidget/shellwidget.cpp 60.52% <80.00%> (+8.15%) ⬆️
src/gui/shellwidget/test/test_ligatures.cpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3910b09...9810052. Read the comment docs.

QString::at does not handle multi-byte Unicode characters. A naive call will
only select the first byte from the sequence.

Use the entire UTF8 grapheme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants