Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
take also some unicode blocks to decide if constant charatcter width
assumption is valid
  • Loading branch information
sunderme committed Mar 21, 2024
1 parent c1c50d1 commit ebfac14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qcodeedit/lib/document/qdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7466,6 +7466,8 @@ qreal QDocumentPrivate::textWidth(int fid, const QString& text){
containsAsianChars = true;
else if (c >= QChar(0xff00) && c <= QChar(0xffef))
containsAsianChars = true;
else if (c >= QChar(0x3000) && c <= QChar(0x303f))
containsAsianChars = true;
}
if (!containsAsianChars && !containsSurrogates)
// TODO: we've blacklisted certain characters from which we know they may have non-standard text width
Expand Down

0 comments on commit ebfac14

Please sign in to comment.