> 2017/02/22 7:32、David Adams via 4D_Tech <[email protected]> のメール: > Version 1.2 does have a textArea object that Miyako mentions. This supports > text wrap, but I don't know how widely supported it is.
4D added a limit subset of SVG Tiny 1.2 in 11.3, notably, textArea, tbreak, text-align, display-align, viewport-fill and viewport-fill-opacity, which are really practical and useful when you want to create dynamic image renderings of text. most web browsers implement SVG 1.1 http://caniuse.com/#feat=svg so textArea is generally ignored. if that is a problem, you could convert the SVG to PDF (Mac) or PNG. > <text y="20"> > <tspan x="10">tspan line 1</tspan> > <tspan x="10" dy="15">tspan line 2</tspan> > <tspan x="10" dy="15">tspan line 3</tspan> > </text> I would seconds that. TEXT TO ARRAY will help you break the text into lines with wrapping. http://doc.4d.com/4Dv16/4D/16/TEXT-TO-ARRAY.301-3036776.en.html > * If you've got reusable elements - some kind of picture, group of items, > or some text - you can define them and then reuse them throughout the SVG. > It makes it a lot simpler to construct when you're pretty much saying > "copy" instead of building the same thing repeatedly from scratch. Look for > <defs> and <symbol>. Actually, look at <use> and work back from there as > you'll find it's even more flexible than I've described. one practical use of "use" is to implement embedded fonts. for example, OCR demands that a certain "font" is used for scanning. instead or printing text, you could draw each characters in position as SVG paths. each character (a use element) would be an xlink;href to an entity in defs. you can create such paths from a scanned image with tools like potrace. https://github.com/miyako/4d-plugin-potrace > * CSS is your friend. (Your weird, confusing, somewhat misguided friend, > granted.) There's a ton of ways that you can leverage CSS in SVG to make > styling and various behaviors easier. that is right, instead of defining each attribute inline, it's better to reference classed defined in defs. ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

