mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 14:30:52 +02:00
* Fix issue ID #35251 (patch from Rumen Gyurov)
git-svn-id: trunk@48696 -
This commit is contained in:
parent
3227c5953d
commit
aa4fd5e6b1
@ -940,12 +940,18 @@ end;
|
|||||||
function TFontSubsetter.buildHmtxTable: TStream;
|
function TFontSubsetter.buildHmtxTable: TStream;
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
|
GID: longint;
|
||||||
|
LastGID: longint;
|
||||||
begin
|
begin
|
||||||
Result := TMemoryStream.Create;
|
Result := TMemoryStream.Create;
|
||||||
|
LastGID := Length(FFontInfo.Widths)-1;
|
||||||
for n := 0 to FGlyphIDs.Count-1 do
|
for n := 0 to FGlyphIDs.Count-1 do
|
||||||
begin
|
begin
|
||||||
WriteUInt16(Result, FFontInfo.Widths[FGlyphIDs[n].GID].AdvanceWidth);
|
GID := FGlyphIDs[n].GID;
|
||||||
WriteInt16(Result, FFontInfo.Widths[FGlyphIDs[n].GID].LSB);
|
if GID > LastGID then
|
||||||
|
GID := LastGID;
|
||||||
|
WriteUInt16(Result, FFontInfo.Widths[GID].AdvanceWidth);
|
||||||
|
WriteInt16(Result, FFontInfo.Widths[GID].LSB);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user