Ignore:
Timestamp:
Feb 28, 2019, 4:17:24 AM (6 years ago)
Author:
ataylor
Message:

Improve DBCS string width calculations, other small tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/RichTextLayoutUnit.pas

    r418 r420  
    834834  begin
    835835    Element := ExtractNextTextElement( P, NextP );
    836     CheckSpecialElementType( Element.Character, Element.ElementType, InsideDBC, Codepage );   // ALT
     836
     837    // ALT - handle double-byte characters
     838    if InsideDBC and ( P < EndP ) then
     839    begin
     840      P := NextP;
     841      Element := ExtractNextTextElement( P, NextP );
     842      InsideDBC := false;
     843    end;
     844    CheckSpecialElementType( Element.Character, Element.ElementType, InsideDBC, Codepage );
     845    // ALT done
    837846
    838847    case Element.ElementType of
Note: See TracChangeset for help on using the changeset viewer.