gnujpdf - use UTF-8 in string.getBytes() everywhere

This commit is contained in:
Jindra Petřík
2022-10-22 21:15:20 +02:00
parent ef2ccab594
commit 31a461ca96
19 changed files with 304 additions and 305 deletions

View File

@@ -25,12 +25,12 @@ public class PDFEmbeddedFont extends PDFFont {
@Override
public void write(OutputStream os) throws IOException {
writeStart(os);
os.write("/Subtype /Type0\n".getBytes());
os.write(("/BaseFont " + font + "\n").getBytes());
os.write(("/Name " + name + "\n").getBytes());
os.write("/Encoding /Identity-H\n".getBytes());
os.write(("/ToUnicode " + toUnicode + "\n").getBytes());
os.write(("/DescendantFonts [" + descendantFont + "]\n").getBytes());
os.write("/Subtype /Type0\n".getBytes("UTF-8"));
os.write(("/BaseFont " + font + "\n").getBytes("UTF-8"));
os.write(("/Name " + name + "\n").getBytes("UTF-8"));
os.write("/Encoding /Identity-H\n".getBytes("UTF-8"));
os.write(("/ToUnicode " + toUnicode + "\n").getBytes("UTF-8"));
os.write(("/DescendantFonts [" + descendantFont + "]\n").getBytes("UTF-8"));
writeEnd(os);
}