Skip to content

Commit c920fa2

Browse files
Revert "Fix HTML PDF rendering using random font from Hashtable iteration"
This reverts commit e0712f5. Revert change made by mistake
1 parent e0712f5 commit c920fa2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

dotnet/src/dotnetframework/GxPdfReportsCS/PDFReportItext4.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -811,14 +811,14 @@ public override void GxDrawText(String sTxt, int left, int top, int right, int b
811811
if (!string.IsNullOrEmpty(fontPath))
812812
{
813813
FontFactory.Register(fontPath, fontName);
814+
styles.LoadTagStyle("body", "face", fontName);
815+
816+
if (IsEmbeddedFont(fontName))
817+
styles.LoadTagStyle("body", "encoding", BaseFont.IDENTITY_H);
818+
else
819+
styles.LoadTagStyle("body", "encoding", BaseFont.WINANSI);
814820
}
815821
}
816-
string defaultFontName = baseFont.PostscriptFontName;
817-
styles.LoadTagStyle("body", "face", defaultFontName);
818-
if (IsEmbeddedFont(defaultFontName))
819-
styles.LoadTagStyle("body", "encoding", BaseFont.IDENTITY_H);
820-
else
821-
styles.LoadTagStyle("body", "encoding", BaseFont.WINANSI);
822822
}
823823

824824
//Bottom and top are the absolutes, regardless of the actual height at which the letters are written.

0 commit comments

Comments
 (0)