Examples 文字関連 str04.pxdx

文字を終端寄せ
<?xml version="1.0" encoding="utf-8"?>
<!-- 用紙サイズ「A4」用紙方向「縦」 -->
<pxd paper-type="a4" orientation="portrait" title="文字">
<page>
   <!-- 値10の時1mmになるように設定 -->
   <svg x="0" y="0" width="21cm" height="29.7cm" viewBox="0 0 2100 2970">
      
      <!-- 横「8cm」縦「5cm」を終端にして文字を書く -->
      <text x="800" y="500" font-size="200" fill="black" stroke="none" text-anchor="end">文字の例</text>
      
      <!-- 横2cm 縦5cm の位置から横15cm 縦5cmの位置に黒色の線を引く。 -->
      <line x1="200" y1="500" x2="1500" y2="500" stroke="black" stroke-width="1"/>
      
      <!-- 横8cm 縦2cm の位置から横8cm 縦5cmの位置に黒色の線を引く。 -->
      <line x1="800" y1="200" x2="800" y2="500" stroke="black" stroke-width="1"/>


      <!-- tspanとの組合せ -->
      <text x="800" y="900" font-size="200" fill="black" stroke="none" text-anchor="end"><tspan dy="-15">文字の例</tspan></text>
      <!-- 下線 -->
      <line x1="200" y1="900" x2="1500" y2="900" stroke="black" stroke-width="1"/>
      <line x1="800" y1="700" x2="800" y2="900" stroke="black" stroke-width="1"/>
      
      
      <!-- 横「8cm」縦「5cm」を終端にして文字を書く -->
      <text x="800" y="2000" font-size="200" fill="black" stroke="none" writing-mode="tb" text-anchor="end">文字の例</text>
      <line x1="800" y1="700" x2="800" y2="2000" stroke="black" stroke-width="1"/>
   </svg>
</page>
</pxd>