# How can I temporarily type a text with different font that defined in the style file? [duplicate]

For example, I've written a text, and in the somewhere of there I wanna use different font size, font type, color etc. Or in another way, hown can I change my font temporarily within the text ?

I've edited to correct problem with simple solution. Here's how I generally do it if the quantity of text is small enough to be done inline:

\documentclass[12pt]{article}

\newcommand\finline[3][]{\begin{myfont}[#1]{#2}#3\end{myfont}}%

% ENVIRONMENT FOR NEW FONT
\newenvironment{myfont}[2][]{\csname#2\endcsname[#1]}{}

\newcommand{\Alpine}[1][]{\fontfamily{Alpine}#1\selectfont}

\begin{document}

Original Font \finline[\fontsize{30}{36}]{Alpine}{Text in New Font}
returned to original font
\end{document}


Sorry I can't on this old-old computer turn my PDF into a jpg to show you. Will edit when I can. Obviously Alpine is a font installed on my computer. You will have to pick a font that is on your computer