Browse Source

+ introduced UDrivers.EgcWidth

git-svn-id: branches/unicodekvm@48812 -
nickysn 4 years ago
parent
commit
00beafae5b
1 changed files with 15 additions and 0 deletions
  1. 15 0
      packages/fv/src/drivers.inc

+ 15 - 0
packages/fv/src/drivers.inc

@@ -335,6 +335,14 @@ procedure GiveUpTimeSlice;
 {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
 
 
+{$ifdef FV_UNICODE}
+{-EgcWidth-----------------------------------------------------------
+Returns the number of display columns needed to display the extended
+grapheme cluster EGC.
+---------------------------------------------------------------------}
+FUNCTION EgcWidth(Const EGC: Sw_String): Sw_Integer;
+{$endif FV_UNICODE}
+
 {-StrWidth-----------------------------------------------------------
 Returns the number of display columns needed to display the string S.
 ---------------------------------------------------------------------}
@@ -940,6 +948,13 @@ end;
 {                           BUFFER MOVE ROUTINES                            }
 {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
 
+{$ifdef FV_UNICODE}
+FUNCTION EgcWidth(Const EGC: Sw_String): Sw_Integer;
+BEGIN
+   Result := Video.ExtendedGraphemeClusterDisplayWidth(EGC);
+END;
+{$endif FV_UNICODE}
+
 {$ifdef FV_UNICODE}
 FUNCTION StrWidth(Const S: Sw_String): Sw_Integer;
 BEGIN