David PHAM-VAN

Fix letterSpacing issue

@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 - Add RadialGrid for charts with polar coordinates 7 - Add RadialGrid for charts with polar coordinates
8 - Add PieChart 8 - Add PieChart
9 - Fix Text layout with softwrap 9 - Fix Text layout with softwrap
  10 +- Fix letterSpacing issue
10 11
11 ## 3.0.1 12 ## 3.0.1
12 13
@@ -262,28 +262,28 @@ class PdfGraphics { @@ -262,28 +262,28 @@ class PdfGraphics {
262 void setFont( 262 void setFont(
263 PdfFont font, 263 PdfFont font,
264 double size, { 264 double size, {
265 - double? charSpace = 0,  
266 - double wordSpace = 0,  
267 - double scale = 1, 265 + double? charSpace,
  266 + double? wordSpace,
  267 + double? scale,
268 PdfTextRenderingMode? mode = PdfTextRenderingMode.fill, 268 PdfTextRenderingMode? mode = PdfTextRenderingMode.fill,
269 - double rise = 0, 269 + double? rise,
270 }) { 270 }) {
271 buf.putString('${font.name} '); 271 buf.putString('${font.name} ');
272 PdfNum(size).output(buf); 272 PdfNum(size).output(buf);
273 buf.putString(' Tf\n'); 273 buf.putString(' Tf\n');
274 - if (charSpace != 0) {  
275 - PdfNum(charSpace!).output(buf); 274 + if (charSpace != null) {
  275 + PdfNum(charSpace).output(buf);
276 buf.putString(' Tc\n'); 276 buf.putString(' Tc\n');
277 } 277 }
278 - if (wordSpace != 0) { 278 + if (wordSpace != null) {
279 PdfNum(wordSpace).output(buf); 279 PdfNum(wordSpace).output(buf);
280 buf.putString(' Tw\n'); 280 buf.putString(' Tw\n');
281 } 281 }
282 - if (scale != 1) { 282 + if (scale != null) {
283 PdfNum(scale * 100).output(buf); 283 PdfNum(scale * 100).output(buf);
284 buf.putString(' Tz\n'); 284 buf.putString(' Tz\n');
285 } 285 }
286 - if (rise != 0) { 286 + if (rise != null) {
287 PdfNum(rise).output(buf); 287 PdfNum(rise).output(buf);
288 buf.putString(' Ts\n'); 288 buf.putString(' Ts\n');
289 } 289 }