dengjia hace 6 meses
padre
commit
cab214d518

BIN
core/src/test/resources/SourceHanSansSC-Regular.ttf


+ 17 - 4
core/src/test/resources/alice.xhtml

@@ -1,5 +1,8 @@
+<?xml version='1.0' encoding='UTF-8'?>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
+    <meta charset="UTF-8"></meta>
     <title>Alice's Adventures in Wonderland -- Chapter I</title>
     <style type="text/css" media="all">
         @font-face {
@@ -7,6 +10,14 @@
             src: url("https://mdn.github.io/css-examples/web-fonts/VeraSeBd.ttf");
         }
 
+        @font-face {
+            font-family: "Source Han Sans SC";
+            src: url("/Users/jackd/dev/reports/springboot.pdfgenerator/core/target/test-classes/SourceHanSansSC-Regular.ttf");
+            /* src: local("STFangsong"); */
+            -fs-pdf-font-embed: embed;
+            -fs-pdf-font-encoding: Identity-H;
+        }
+
         html {
             background-color: #339;
         }
@@ -43,8 +54,10 @@
         }
 
         h1, h2 {
-            font-family: PenultimateLight;
-            font-weight: normal;
+            /* font-family: "STFangsong"; */
+            font-family: "Source Han Sans SC";
+            /* font-family: "PenultimateLight"; */
+            /* font-weight: normal; */
         }
 
         h1 {
@@ -112,9 +125,9 @@
 </p>
 
 
-<h1>CHAPTER I</h1>
+<h1>CHAPTER 是的 -  I 中文</h1>
 
-<h2>Down the Rabbit-Hole</h2>
+<h2>Down 我们 the Rabbit-Hole</h2>
 
 <p>
     Alice was beginning to get very tired of sitting by her sister