
This might not work with any eps
, but for not very complex vector graphics,
this workflow can be used:
- convert
Logob.eps
to Asymptote
with pstoedit -f asy Logob.eps Logob.asy
;
- simplify
asy
code and add commands to change color where appropriate.
For the logo provided pstoedit
found that DIN-Regular
font is used for the text.
Following Logob.tex
contains a procedure to draw the logo in asydef
,
which accepts parameters for the background color, colors of the books
and colors of the three lines of text.
\documentclass{article}
\usepackage{fontspec}
\setmainfont{dinregular.ttf}
\usepackage[inline]{asymptote}
\begin{asydef}
size(88,43);
import pstoedit;
void logo(pen bgPen=white,pen[] bookPen=new pen[]{black}, pen[] textPen=bookPen){
filldraw(box((0,0),(89,43)),bgPen,bgPen);
textpen=textPen[0];
textpen += fontsize(7.84581);
label(baseline("language"),(56.229,33),align,textpen);
textpen=textPen[1%textPen.length];
textpen += fontsize(8.02011);
label(baseline("science"),(56.229,23.5),align,textpen);
textpen=textPen[2%textPen.length];
textpen += fontsize(8.02011);
label(baseline("press"),(56.229,14),align,textpen);
currentpen += 0.5bp;
currentpen += squarecap;
currentpen += miterjoin;
currentpen += linetype(" ",false);
fill((14.0195,42.5195)--(0,2.47656)--(7.07031,0)
--(21.0898,40.043)--cycle,bookPen[0%bookPen.length]);
fill((21.0859,42.4258)--(21.0859,0)--(28.5781,0)
--(28.5781,42.4258)--cycle,bookPen[1%bookPen.length]);
fill((29.5742,42.4258)--(29.5742,0)--(37.0664,0)
--(37.0664,42.4258)--cycle,bookPen[2%bookPen.length]);
fill((38.0625,33.9648)--(38.0625,0)--(45.5547,0)
--(45.5547,33.9648)--cycle,bookPen[3%bookPen.length]);
fill((46.5508,42.4258)--(46.5508,0)--(54.043,0)
--(54.043,42.4258)--cycle,bookPen[4%bookPen.length]);
}
\end{asydef}
\begin{document}
\begin{minipage}{88bp}
\begin{asy}
logo();
\end{asy}
\end{minipage}
\begin{minipage}{88bp}
\begin{asy}
logo(bgPen=gray,bookPen=new pen[]{white},textPen=new pen[]{black});
\end{asy}
\end{minipage}
%
\begin{minipage}{88bp}
\begin{asy}
logo(bgPen=lightblue+opacity(0.3),bookPen=new pen[]{green,orange});
\end{asy}
\end{minipage}
%
\begin{minipage}{88bp}
\begin{asy}
logo(bgPen=lightgreen+opacity(0.3),bookPen=new pen[]{red,green,darkblue,orange,yellow}
,textPen=new pen[]{red,green,blue});
\end{asy}
\end{minipage}
\end{document}
To process it with xelatex
, run:
xelatex Logob.tex
asy -f pdf -tex=xelatex Logob-*.asy
xelatex Logob.tex