mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-19 04:29:37 +01:00
parent
81ab0126b2
commit
705178081a
@ -10,6 +10,8 @@ unit svgvectorialwriter;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{.$define FPVECTORIAL_SVGWRITER_TEXT_OFFSET}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -254,8 +256,14 @@ begin
|
|||||||
SVGFontFamily := 'Arial, sans-serif';//lText.FontName;
|
SVGFontFamily := 'Arial, sans-serif';//lText.FontName;
|
||||||
|
|
||||||
AStrings.Add(' <text ');
|
AStrings.Add(' <text ');
|
||||||
|
// Discussion about this offset in bugs 22091 and 26817
|
||||||
|
{$IFDEF FPVECTORIAL_SVGWRITER_TEXT_OFFSET}
|
||||||
AStrings.Add(' x="' + FloatToStr(PtX+0.5*lText.Font.Size, FPointSeparator) + '"');
|
AStrings.Add(' x="' + FloatToStr(PtX+0.5*lText.Font.Size, FPointSeparator) + '"');
|
||||||
AStrings.Add(' y="' + FloatToStr(PtY-6.0*lText.Font.Size, FPointSeparator) + '"');
|
AStrings.Add(' y="' + FloatToStr(PtY-6.0*lText.Font.Size, FPointSeparator) + '"');
|
||||||
|
{$ELSE}
|
||||||
|
AStrings.Add(' x="' + FloatToStr(PtX, FPointSeparator) + '"');
|
||||||
|
AStrings.Add(' y="' + FloatToStr(PtY, FPointSeparator) + '"');
|
||||||
|
{$ENDIF}
|
||||||
// AStrings.Add(' font-size="' + IntToStr(FontSize) + '"'); Doesn't seam to work, we need to use the tspan
|
// AStrings.Add(' font-size="' + IntToStr(FontSize) + '"'); Doesn't seam to work, we need to use the tspan
|
||||||
AStrings.Add(' font-family="' + SVGFontFamily + '">');
|
AStrings.Add(' font-family="' + SVGFontFamily + '">');
|
||||||
AStrings.Add(' <tspan ');
|
AStrings.Add(' <tspan ');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user