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/CanvasFontManager.pas

    r418 r420  
    11341134  EnsureMetricsLoaded;
    11351135  GpiQueryTextBox( FCanvas.Handle, Length, S^, TXTBOX_COUNT, aptl[0] );
    1136   // The pad of 2.1 per character was chosen through experimentation, since the
    1137   // actual returned value always seems too narrow. I have no idea why. (ALT)
    1138   Result := ( 2.1 + aptl[ TXTBOX_BOTTOMRIGHT ].x) * FontWidthPrecisionFactor;
     1136  Result := aptl[ TXTBOX_CONCAT ].x * FontWidthPrecisionFactor;
    11391137end;
    11401138//
Note: See TracChangeset for help on using the changeset viewer.