def text.present

gralha-svg-render@0.1.0.1 · svg.bend:3911

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-xml-doc@0.1.0.1/xml.bend as XML

3911# Font loading must include text hidden inside an SVG image data URI.
3912def text.present(+xs: List<&2, XML.Element>) -> Bool:
3913  match xs:
3914    case Nil{}: False{}
3915    case Con{XML.Element{n, as, kids, txt}, rest}: U.string.equal(n, "text") || (U.string.equal(n, "image") && image.svg.reference(U.trim.both(XML.attr.get(as, "href", XML.attr.get(as, "xlink:href", ""))))) || text.present(kids) || text.present(rest)

Uses (9)

Used by (0)

No other definition uses this definition.