tikzを使用して1文字を変換する

tikzを使用して1文字を変換する

タイトル ページの 1 つの文字を非常に特殊な方法で変形したいと考えています。実現しようとしている効果を説明するために、画像を添付しました。文字 H の左半分が右半分よりも短いのに、文字の上部が水平になっていることに注目してください。tikz を使用して何らかの方法で変形させたいと思うのですが、どのように実現すればよいかわかりません。誰か助けてくれませんか?

引き伸ばされた文字H

答え1

免責事項:これは TikZ の回答ではありませんが、とにかく...

撮影テキストアウトラインに関するこの質問に対するスラストンの回答参考までに、変形した H 文字を取得するには、次の操作を実行できます。これは概念実証であるため、個々の文字でのみ機能しますが、さらに調整することで完全な単語に適応させることも可能です。

\documentclass{standalone}
\usepackage[latex,shellescape]{gmp}
\begin{document}
\begin{mpost}[name=H]
picture nice;
path P, PP;

nice := image(draw thelabel(\btex H etex,origin));

%Transformation
vardef T(expr p) =
    save x, y;
    x := xpart p; y := ypart p;
%0.01 by guessing. Play with other values
    (x,0.01x*y) 
enddef;

%Assumes a cyclic path
%It can be done better
vardef TT(expr P) =
    T(point 0 of P) 
    .. controls
    T(postcontrol 0 of P) and T(precontrol 1 of P) 
    for j = 1 upto (length P - 1):
        .. T(point j of P) 
        .. controls T(postcontrol j of P) 
            and T(precontrol (j+1) of P) 
    endfor
    .. cycle
enddef;

for i within nice:
    if textual i:
        for j = 1 upto length textpart i:
            string s; s := substring(j-1,j) of textpart i;
            picture g; g := glyph ASCII s of fontpart i scaled 1/10;
            picture r; r := image(
            for x within g:
                picture xx; xx := image(draw g);
%75 is also guessing. Try other values
%Bad filling. It works for the letter H, tho.
                fill TT(pathpart x shifted (llcorner xx - ulcorner xx + 75right)) withcolor
                if greypart x = 1:
                    1
                else:
                    (1,0.843,0)
                fi;
            endfor
            );
            draw r;
        endfor 
    fi
endfor
\end{mpost}\usempost{H}%
\end{document}

ここに画像の説明を入力してください

比較のために、文字 Q の結果を以下に示します (偽の塗りつぶしを適用)。

ここに画像の説明を入力してください

関連情報