书写风格设计

书写风格设计

在此处输入图片描述

我怎样才能像上面的图片那样写?

答案1

\documentclass[rgb]{article}
\usepackage{tikz, pdfrender}
\usetikzlibrary{fadings, patterns.meta}
\newcounter{myn}%
\newcommand{\design}[1]{%
\definecolor{mycyan}{RGB}{80, 200, 230}%
\begin{tikzfadingfrompicture}[name=\themyn, inner sep=0pt, outer sep=0pt, anchor=base]
\node[transparent!100, fill=transparent!0] (n) {#1};
\path (0,0) circle[radius=10];%encompassing circle for alignment
\end{tikzfadingfrompicture}%
\begin{tikzpicture}[inner sep=0pt, outer sep=0pt, anchor=base]
\filldraw[thin, black, pattern color=mycyan, pattern={Lines[angle=44, distance=0.28mm, line width=0.22pt]}] (n.south west) rectangle (n.north east);
\filldraw[thin, black, pattern color=mycyan, pattern={Lines[angle=45, distance=0.30mm, line width=0.24pt]}] (n.south west) rectangle (n.north east);
\filldraw[thin, black, pattern color=mycyan, pattern={Lines[angle=46, distance=0.32mm, line width=0.26pt]}] (n.south west) rectangle (n.north east);
\fill[black, path fading=\themyn, fit fading=false] (n.south west) rectangle (n.north east);
\node{\textpdfrender{
TextRenderingMode=Stroke,
LineWidth=0.6pt,
StrokeColor=mycyan,
LineJoinStyle=Round,
}{#1}};
\stepcounter{myn}
\end{tikzpicture}}

\begin{document}
\pagecolor{black}\color{white}
~\\
This is not a \design{\Huge\bf MATH} problem.\\
This is not a {\Huge\bf MATH} problem.\\
~\\
\design{\Large\bf This is a huge problem}
\end{document}

白色和青色条​​纹的文字

青色条纹中的“MATH”一词

答案2

由于 OP 最初确实用 Tikz 标记,因此可能需要绘图而不是特定字体。我无法帮助 Tikz,但在元帖子您有一个glyph运算符,可让您从字体中获取字符的轮廓路径。这将让您生成如下内容:

在此处输入图片描述

尽管让它看起来像手绘的有点困难。

\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
newinternal thatch_angle;
newinternal thatch_space;
thatch_angle := 52;
thatch_space := 16;
def rule expr p = _apth := p; _thatch enddef;
def _thatch text t =
    d_ := 2 abs (urcorner _apth - llcorner _apth);
    draw begingroup; save T; picture T; T = image(
        for y=-d_ step thatch_space until d_:
            draw (left--right) scaled d_ rotated 1/8 normaldeviate shifted (0, y) t;
        endfor) rotated thatch_angle shifted center _apth;
        clip T to _apth;
        T endgroup
enddef;
beginfig(1);
    numeric x; x = 0;
    background := black;
    drawoptions(withcolor (0, 13/16, 15/16));
    for s = "M", "A", "T", "H":
        picture g;
        g = glyph s of "ptmr8r";
        numeric n; n = 0;
        for i within g:
            if odd incr n: 
                rule pathpart i shifted (x, 0) withpen pencircle scaled 8;
            else:
                unfill pathpart i shifted (x, 0);
            fi
            draw pathpart i shifted (x, 0) withpen pencircle scaled 4;
        endfor
        x := x + xpart (urcorner g - llcorner g);
        if s = "A": % hack the kerning...
            x := x - 132;
        fi
    endfor
    picture P; P = currentpicture; 
    currentpicture := nullpicture;
    drawoptions();
    bboxmargin := 40;
    fill bbox P withcolor background; draw P;
endfig;
\end{mplibcode}
\end{document}

您需要用 来编译它lualatex

相关内容