**** Premises for this post ****
As I believe I very much understand - not only - the title of this thread - but -
also the 'place' the person asking the question were at;
I now felt it might be an idea to sum up
- so that a future 'me' or others might get faster onwards ! :)
I've used LaTeXila running on a Raspberry Pi doing my 'research'
So
- I've read this thread several time
- some of the 'places' it points to
- and some other 'stuff' as well
I still have a lot to learn about how to change- & use other fonts in LaTeX
My intend here is not to recap all there is to know about how to use various fonts in LaTeX
- nor to explain the technicalities of it all -
merely giving that basic starting point were one would know enough to explore further on with ... ease ?
- or at least get starting experimenting for one self getting some output with ease
THUS this post is the post I would have liked to read knowing;
NOT _that_ much about all the glorious finer details of LaTeX
**** / ****
**** A VERY basic 'introduction' on how to 'tame' the use of fonts in LaTeX ****
The fonts(2) that works out of the hat with LaTeX have been prepared to do just so in another way than
fonts(1) that have been prepared to work with ones operating system(OS) for the computer.
Fonts (2)
As mentioned previously in this thread; here:
https://tug.org/FontCatalogue/alphfonts.html is a good place to go
- I've looked at it several times and I to didn't realized that one gets information on how to use a specific font when clicking on it.
It seems that if one use a font from there that then become the default in ones document;
it only works when building the PDF output using LaTeX
- one can recognize those as they have »\normalfont« as style example like the font Bookman
https://tug.org/FontCatalogue/bookman/
If one build using XeTex then apparently LatinModern ? is set as default
(I've yet not figured out if it is possible to use another font with »\normalfont« as style example when building the PDF with XeTeX - without re-defining commands !)
In contrast a font like Bbold
https://tug.org/FontCatalogue/bbold/ have »\bbfamily« as style example
If one comment out all in the example below relating to XeTex - and build using LaTeX - then one can test out;
how to have Bookman, Bera or LatinModern as default font (depending which one is not commented out)
and 'mix' in Bbold when one see fit.
_obviously_ one get Bbold as default if starting out with it's switch »\bbfamily« and never change to »\normalfont«
'Native' font(S) for LaTeX I find simply searching for »texlive font« in Synaptic (a package manager for Debian based GNU/Linux)
A specific font(Bbold) I see at Tug and I like to use I search for with »texlive bbold«
So if I have installed »texlive-fonts-extra« I then have the font Bbold present in my TeX-installation
... or I could try finding out how to see it directly in my file- hierarchy ;O
(Now you try to see if you have the 4 fonts mentioned above installed ? ...)
Fonts (1)
The fonts coming with your OS or fonts you find elsewhere (outside of LaTeX) you can use if;
you enable the package »{fontspec}« and have »texlive-latex-recommended« & »texlive-xetex« installed
- I recommend to read package-documentation
https://www.ctan.org/pkg/fontspec
'Obviously' you would _have_ to figure out what fonts your OS have
- AND where they're stored on your specific system in order to add fonts there you find elsewhere ...
With LaTeXila one needs to enable building PDF with XeTeX via the »Manage Build Tools« found in menu »Build«
and obviously build with XeTeX rather than LaTeX ;P
It should be clear in the below example what part(S) relate to XeTeX so you can
- try out on your own with YOUR fonts(1)
- comment it out if you like to try out fonts(2) for LaTeX instead
If not ... then you should await till you have more basic knowledge of how to work with LaTeX ? :)
**** / ****
**** Building with XeTeX on my 'system' this is the output I get
with the below - that isn't the down-the-shelf-Minimal-Working-Example !
- it's meant to be studied, changed and corrected in your ways so you'll learn BOTH of the 2 approaches ! :) ****
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% *compiling* of LaTeX with non-TeX fonts .otf .ttf ->
% *build* using »xetex« -> PDF
% - package {fontspec} doesn't *work* with »pdflatex«
%%%%% <- *compiling* Of LaTeX with non-TeX fonts .otf .ttf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage[utf8]{inputenc}
% This font have its 'own' switch: \bbfamily
% - and works both with »xetex« & »pdflatex«
\usepackage{bbold}
% The following fonts works as \normalfont ONLY if build with »pdflatex«
% - build with »xetex« then {lmodern} apparently is always used
%\usepackage{lmodern}
%\usepackage{bera}
\usepackage{bookman}
\usepackage[T1]{fontenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% *works* only with »xetex« ->
% Make it possible to use non-Tex fonts
% - with the below definitions
\usepackage{fontspec}
% Font Data70.ttf is 'installed' in
% - /usr/share/fonts/truetype
% - /home/raspi/.fonts
% Definé \SH as a switch
\newfontfamily\SH[Ligatures=TeX]{Data70.ttf}
% Definé \textSH as a text-style
\DeclareTextFontCommand{\textSH}{\SH}
%%%%% <- *works* only with »xetex«
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
Here is the `normal' font.
\bbfamily
Lorem ipsum
% *works* only with »xetex«
\textSH{Så @ prøver vi tegn ff f\mbox{}f,.}
Mere Lorem ipsum
% *works* only with »xetex«
\SH
And yet another switch
{\normalfont Roman font selected here}
test
\normalfont
and then back to `normal' font.
\end{document}