Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
2.6 KB
Raw Blame
<svg width="420px" height="100px"
    xmlns="http://www.w3.org/2000/svg" version="2.0">
<g id="testRect">
    
    <!-- This tests hanging punctuation, which is part of css3-text, but currently has very few implementations, the force-end and allow-end options are particularly useful for East Asian text layout though.-->
    
    <!-- These lines define the position of the baseline for the horizontal text. -->
    <line x1="5" x2="225" y1="35" y2="35" stroke="powderblue" />
    
    <!-- These lines define the inline-size boundaries for horizontal text -->
    <line x1="10" x2="10" y1="5" y2="95" stroke="cornflowerblue" />
    <line x1="110" x2="110" y1="5" y2="95" stroke="cornflowerblue" />
    <line x1="120" x2="120" y1="5" y2="95" stroke="cornflowerblue" />
    <line x1="220" x2="220" y1="5" y2="95" stroke="cornflowerblue" />
    
    
    
    <text id="test1" transform="translate(10,35)" hanging-punctuation="first last" line-height="1.0"
          font-family="DejaVu Sans" fill="blue" text-anchor="start" font-size="15" inline-size="100">(Lorem ipsum dolor sit amet conseq)
    </text>
    
    <text id="test1rtl" transform="translate(220,35)" hanging-punctuation="first last" line-height="1.0"
          font-family="DejaVu Sans" fill="blue" font-size="15" direction="rtl" text-anchor="start" inline-size="100">&quot;اللغة العربية المعيارية الحديثة &quot;</text>
    
    <!-- These lines define the position of the baseline for the vertical text. Note that the default baseline for vertical is through the middle. -->
    <line x1="300" x2="300" y1="15" y2="95" stroke="powderblue" />
    <line x1="340" x2="340" y1="15" y2="95" stroke="powderblue" />
    
    <!-- These lines define the inline-size boundaries for vertical text -->
    <line x1="230" x2="410" y1="15" y2="15" stroke="cornflowerblue" />
    <line x1="230" x2="410" y1="75" y2="75" stroke="cornflowerblue" />
    

    <text id="test1ttb" transform="translate(300,15)" hanging-punctuation="first allow-end last" line-height="1.0"
        font-family="Krita_Test_Unicode_Variation_A, DejaVu Sans" fill="blue" font-size="15" 
          writing-mode="vertical-rl" text-anchor="sstart" inline-size="60">&quot;ああ&#x82A6;&#x82A6;あ&#x82A6;あ&#x82A6;.ああ&#x82A6;あああ&quot;
    </text>
    
    <text id="test1-lr-ttb" transform="translate(340,15)" hanging-punctuation="first force-end last" line-height="1.0"
        font-family="Krita_Test_Unicode_Variation_A, DejaVu Sans" fill="blue" font-size="15" 
          writing-mode="vertical-lr" text-anchor="start" inline-size="60">&quot;ああ&#x82A6;&#x82A6;あ&#x82A6;. あ&#x82A6;ああ&#x82A6;あああ&quot;
    </text>

</g>

</svg>