From eb0758f050bd0432e18b66972ffd5eefb751e199 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Thu, 14 Apr 2022 20:22:49 -0400 Subject: [PATCH] only combine when it forms part of the same byte sequence --- src/UglyToad.PdfPig/Graphics/ContentStreamProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig/Graphics/ContentStreamProcessor.cs b/src/UglyToad.PdfPig/Graphics/ContentStreamProcessor.cs index 33854211..52760142 100644 --- a/src/UglyToad.PdfPig/Graphics/ContentStreamProcessor.cs +++ b/src/UglyToad.PdfPig/Graphics/ContentStreamProcessor.cs @@ -295,7 +295,7 @@ : currentState.CurrentStrokingColor; Letter letter = null; - if (Diacritics.IsInCombiningDiacriticRange(unicode) && letters.Count > 0) + if (Diacritics.IsInCombiningDiacriticRange(unicode) && bytes.CurrentOffset > 0 && letters.Count > 0) { var attachTo = letters[letters.Count - 1];