This is very hard to google itself. I have been told it is possible to use the Google
logo in regular text in LaTeX, but I'm struggling to find out how.
For example:
Some words, then {Google Logo here} and then so on...
fontsgraphicssymbols
This is very hard to google itself. I have been told it is possible to use the Google
logo in regular text in LaTeX, but I'm struggling to find out how.
For example:
Some words, then {Google Logo here} and then so on...
Best Answer
Image-based approach
The scaling is not perfect, but it's pretty close. The basic idea is to set the height of the image to the sum of the height of
G
and the depth ofg
in the current font. Then lower the image by the depth ofg
to attempt to align the baseline.Unfortunately, this method is dependent on the descender depth and capital height of the logo font relative to those of the font in use in the TeX document. Slight tweaks might be required. I downloaded the logo as an SVG image and converted it to PDF for use with
\includegraphics
.The
\protected\def
is so that the command can be used in moving arguments. Ifhyperref
is used, you might also want\texorpdfstring
or similar for bookmarks/etc.SVG path approach (with Star Wars-inspired testing code)
Alternative to the image-based approach, we can use TikZ's
svg.path
library and borrow the paths for each letter directly from Google's SVG file. This allows us to set the baseline more precisely at the bottom of the "l"'s rectangle (which is why it's drawn first). The main ideas are quite similar to the original method, though.