\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{hologo}
\usepackage{academicons}
\newcommand{\overleaf}{%
{\aiOverleaf\fontspec[Scale=MatchLowercase,LetterSpace=-0.5]{TeX Gyre Adventor}\kern-0.6ex\textbf{verleaf}\kern0.1ex}%
}
\newcommand{\overleaflogo}{%
\PackageWarning{Overleaf}
{Note that the Overleaf logotype requires an
area of clearspace around it, so this may
impact your paragraph's look-and-feel. Use
at your own risk!}%
\begingroup%
\setlength{\fboxrule}{0pt}%
\setlength{\fboxsep}{1.5ex}%
\fbox{\kern-0.5ex{\aiOverleaf}\fontspec[Scale=MatchLowercase,LetterSpace=-0.5]{TeX Gyre Adventor}\kern-0.6ex\textbf{verleaf}}%
\endgroup%
}
%% Note that Overleaf duck is available in tikzducks v1.2. The latest version can be obtained from https://github.com/samcarter/tikzducks
\usepackage{tikzducks}
\begin{document}
The text-based logo generated with the \verb|\overleaflogo| command has a region of clear space around it, and is designed to be used on its own, rather than in the middle of a paragraph. The \verb|\overleaf| command doesn't have this clear space, and so \overleaf{} sits nicely in a paragraph!
We've created this using TeX Gyre Adventor as the font, as it's free and looks very close to the actual logotype. The \verb|\overleaflogo| and \verb|\overleaf| commands defined here use the \aiOverleaf from the \texttt{academicons} package, and hence they currently only work with \hologo{XeLaTeX} and \hologo{LuaLaTeX}!
And here's a little bonus: an Overleaf duck drawn with the amazing \verb|tikzducks| package (v1.2) by Sam Carter!
\tikz\duck[overleaf];
\end{document}