.examples

git-svn-id: svn://ultimatepp.org/upp/trunk@14205 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-03-31 15:04:59 +00:00
parent 38df12a9b9
commit d400a792fc
6 changed files with 41 additions and 79 deletions

View file

@ -1,7 +1,7 @@
#include "TextToSvgPath.h"
struct TextToSvg : FontGlyphConsumer {
String t;
String t; // here we accumulate the SVG path text
void Put(Pointf p);
@ -55,7 +55,7 @@ String TextToSvgPath(double x, double y, const char *text, Font fnt, bool single
TextToSvg t;
for(const wchar *s = ~ws; *s; s++) {
fnt.Render(t, x, y, *s);
x += fnt[*s];
x += fnt[*s]; // move the reference point
if(!singleline)
t.t << "\n";
}