f

#### How to display a font name and font sizes

Hi folks,

I'd like to print name font (and any sizes) in colophon. We've tried
for instance \the\font and \the\familydefault and \f@family and many
others but its output is weird number (ie "Arial(0)", SIL(0)". Here is
our example:

\documentclass[showtrims,a4paper,13pt]{memoir}
\usepackage[brazilian]{babel}
\usepackage{microtype}

% XeLaTeX
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Arial}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Charis SIL}
\setmonofont[Scale=MatchLowercase]{Charis SIL}

\begin{document}

\the\font
\familydefault

\makeatletter

\f@encoding

\f@family

\f@series

\f@shape

\f@size

\f@baselineskip

\makeatother

\end{document}

Thanks for any help,

Jorge Sallum


 0
jorge1676 (60)
6/20/2011 4:34:30 PM
comp.text.tex 39029 articles. 3 followers.

2 Replies
1290 Views

Similar Articles

[PageSpeed] 34

Am Mon, 20 Jun 2011 09:34:30 -0700 (PDT) schrieb jorge sallum:

> Hi folks,
>
> I'd like to print name font (and any sizes) in colophon. We've tried
> for instance \the\font and \the\familydefault and \f@family and many
> others but its output is weird number (ie "Arial(0)", SIL(0)". Here is
> our example:

You can get the primitive name with \fontname. But I don't think
that the short names (Charis SIL) are stored somewhere

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\setsansfont{Charis SIL}
\begin{document}
\fontname\font
\sffamily
\fontname\font
\end{document}

--
Ulrike Fischer

 0
news36084 (710)
6/21/2011 8:06:39 AM
jorge sallum <jorge@hedra.com.br> wrote:

> Hi folks,
>
> I'd like to print name font (and any sizes) in colophon. We've tried
> for instance \the\font and \the\familydefault and \f@family and many
> others but its output is weird number (ie "Arial(0)", SIL(0)". Here is
> our example:
>
>
> \documentclass[showtrims,a4paper,13pt]{memoir}
> \usepackage[brazilian]{babel}
> \usepackage{microtype}
>
>
> % XeLaTeX
> \usepackage{fontspec,xltxtra,xunicode}
> \defaultfontfeatures{Mapping=tex-text}
> \setromanfont[Mapping=tex-text]{Arial}
> \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Charis SIL}
> \setmonofont[Scale=MatchLowercase]{Charis SIL}
>
> \begin{document}
>
> \the\font
> \familydefault
>
> \makeatletter
>
> \f@encoding
>
> \f@family
>
> \f@series
>
> \f@shape
>
> \f@size
>
> \f@baselineskip
>
> \makeatother
>
> \end{document}

You can patch the font definition commands:

\ExplSyntaxOn
\DeclareDocumentCommand \setmainfont { O{} m } {
\cs_set_nopar:Npn \themainfont{#2}
\fontspec_set_family:Nnn \rmdefault {#1}{#2}
\normalfont
}
\DeclareDocumentCommand \setsansfont { O{} m } {
\cs_set_nopar:Npn \thesansfont{#2}
\fontspec_set_family:Nnn \sfdefault {#1}{#2}
\normalfont
}
\DeclareDocumentCommand \setmonofont { O{} m } {
\cs_set_nopar:Npn \thesansfont{#2}
\fontspec_set_family:Nnn \ttdefault {#1}{#2}
\normalfont
}
\ExplSyntaxOff

and use \themainfont, \thesansfont and \themonofont to
print the names you gave.

Notice that \setromanfont is deprecated, use \setmainfont instead.

This might be a useful addition to fontspec (provided it's
better programmed, of course).

Ciao
Enrico

 0
6/21/2011 9:08:07 AM

Similar Artilces:

How to make sure that font style/size in graphics matches with text font/size?
Hi, I'm writing my phd thesis with pdfLaTeX (KOMA script package with "standard" serif fonts, 11 pt) and now have to create technical drawings, schemes and diagrams. (My thesis is about engineering, so there will have to be some technical drawings and sketches, flow charts and schemes, fotos and many many graphs... I'm writing on a PowerBook with OS X, but am also working on a PC with Windows XP.) I'm not sure what software to use to create (vector) graphics and how to ensure that font size and style look good with the text of the document... Should the text in the grap...

how to increase the font size on the axes. ( Not the name of the axis but the scale font )
how do i make the scaling font in the axes look bigger then the default size? for exporting for Power point presentation Please note that i know how to change the x label and y label font size all i need to know is how to change the scale associated with the labels. thanks On 07/10/2015 11:08 PM, aminul chowdhury wrote: > how do i make the scaling font in the axes look bigger then the default > size? for exporting for Power point presentation Please note that i know > how to change the x label and y label font size all i need to know is > how to change the scale associated...

In Windows XP, there's an accessability wizard that allows the user to change the font size for readability. There's probably something similar in other operating systems. I think it would be a nice thing to do for any users with large system font sizes to detect that and offer up an alternative stylesheet. I don't know how to approach this, though, and I'm sure it involves more than CSS. Is it possible to detect this setting? Ian -- http://www.bookstacks.org/ On Sun, 08 Aug 2004 22:53:45 GMT, Ian <blank@blank.com> wrote: >I think it would be a nice th...

How to setup the font type/font size for a text in Version 8.xx ???
In Version 7.xx there was an option to setup the font type (e.g. Times New Roman, Helvetia,...) and the size of a text I want to write into a graphic. But where do I specify these attributes in Version 8.xx ? Regards Paul Shadowfax wrote: > paulbabb@gmx.ch (Paul Babb) wrote in > news:bg8k62$d34$06$1@news.t-online.com: > > >>In Version 7.xx there was an option to setup the font type (e.g. >>Times New Roman, Helvetia,...) and the size of a text I want to >>write into a graphic. >> >>But where do I specify these attributes in Version 8.xx ? > > > > They are on the Tool Options Palette. This should be the long ribbon Tie a yellow ribbon 'round the new PSP, it's been three long months, but nobody still wants me... I'd forget about trust, place the blame on Z', I think I'll go tie a gold ribbon about the new Adobe :-) Uni ... How to setup the font type/font size for a text in Version 8.xx ??? In Version 7.xx there was an option to setup the font type (e.g. Times New Roman, Helvetia,...) and the size of a text I want to write into a graphic. But where do I specify these attributes in Version 8.xx ? Regards Paul Shadowfax wrote: > paulbabb@gmx.ch (Paul Babb) wrote in > news:bg8k62$d34$06$1@news.t-online.com: > > >>In Version 7.xx there was an option to setup the font type (e.g. >>Times New Roman, Helvetia,...) and the size of a text I want to >>write into a graphic. >> >>But where do I specify these attributes in Version 8.xx ? > ...

WVW Hello world with 2 fonts or 2 font sizes of same font
could anyone write a small Hello World using more then 1 font or more sizes then one. I cant figure this one out. Thanks Yon ...

using font generator setvar(font groups, new font name)
I'm trying to determine if you have to create a font for each version and size of the font being used. Ie. Do I have to create seperate fonts for: Courier New, Bold, size 8 and Courier New, italics, size 8 or can I just create one for Courier New size 8 and it recognize it? Any help is much appreciated. Thank you. -Halina ...

Name of the font? Nome font?
Qualcuno mi puo' indicare il nome della font in immagine? Anyone could help me to find the name of the font of the linked image?... http://www.digitalroads.it/temp/font.jpg Grazie/Thanks -- "Papa',cosa sono le icone? - Sono immagini sacre. - E perche Windows ne ha tante? - Perche ci vogliono i miracoli per farlo funzionare" ]-[ardcastle - ICQ#115164955 In article <b27vn1lpt0q7b83dsvljriptjgkqlepi4t@4ax.com>, "M'Pol aka ]-[ardcastle" <lomjoeNOWASTE@hotmail.com> wrote: > Qualcuno mi puo' indicare il nome della font in immagine? > Anyo...

Display font choices each in own font
Has anyone tried to code this? I have learned how to display a list of fonts available from http://www.lebans.com/enumfonts.htm. (thanks, Steve). I presume that one could not show each individual font in its own font as Word has done since 2000? On 21 May 2006 14:41:16 -0700, penguin732901@aol.com wrote: >Has anyone tried to code this? I have learned how to display a list of >fonts available from >http://www.lebans.com/enumfonts.htm. (thanks, Steve). > >I presume that one could not show each individual font in its own font >as Word has done since 2000? I think there ...

Emerald fonts
Hi there, I've installed the Emerald fonts [1] from CTAN, and have got them working on my system. An example such as the LaTeX Font catalogue's text example [2] works perfectly, but I can't work out for the life of me how to resize the font. I'm using this in the context of: \documentclass{article} \usepackage{emerald} \fontfamily{cmss}\fontsize{12pt}{13pt}\selectfont Here's the body of my text {\ECFAugie Some notes in the magin} Body text continues... \end{document} I wish to use cmss as my default font and Augie enclosed in a group only for short notes. ...

Font and font size on iPad
Who can tell me how to do it on iPad or iPhone to write emails with different fonts and generally larger? On the Mac there is the option to choose font and size, but on the iPad and iPhone can not find it. Thanks anyway DrZap -- #4. La vita e' una tempesta, ma prenderla nel culo e' un lampo. (Beppe Gril= lo) http://www.drzap.it & http://www.facebook.com/people/Franco-DrZap/100002204= 128949 Oltre 75.200 battute e barzellette Dr Zap (e-mail : v. sul sito) --- Questa e-mail =C3=A8 stata controllata per individuare virus con Avast anti= virus. http:/...

change matlab workspace font size and editor font size
dear all I wish to change the workspace font size and the editor font size. How do I do it? Thanks in advance, Thanks I have the suggestion in another question posted earlier. "langtran" <lang.tran@iom-world.org> wrote in message news:7795881.1207239680638.JavaMail.jakarta@nitrogen.mathforum.org... > dear all > I wish to change the workspace font size and the editor font size. How do > I do it? > Thanks in advance, Open the Preference window using the Preferences menu item on the File menu. There is a Fonts item in the Preferences that will let ...

ClearType: Does Java AWT use its own font or use the OS's font in displaying text field?
Hi folks, I need to display some ClearType text in a static text field of a GUI window using Java AWT. I heard that Java 2D itself currently does not support ClearType sub-pixel technology. I am wondering if AWT can render font using OS's global font setting, for instance, on Windows XP, the ClearType font can be enabled globally, on Linux, it also has sub-pixel rendering technology can can be enabled OS wide. I am wondering if the Java AWT uses OS's font by default? Furthermore, what shall I do if I want to capture the RGB pixel values of the displayed text and save to harddisk? Th...

Figures captions font size bigger than font size used in document
Hi, I would kindly appreciate some help if someobody could show me (if it is possible - ???) how to give a figure a caption text of the same size that is used on the text of the hole document currently set to footnotesize. While placing caption to figures the caption text is of the size "normalsize" and it is desired to have a caption with font size "footnotesize" Many work arounds were tried with the following commands, \floatingfigure \includegraphics \epsfig \minipage the web was searched and some books consulted with out success Best Regards On Tue, 24 Jan 2006 05:30:49 +0100, Lathe_Biosas <lathe_biosas@hotmail.com> wrote: > Hi, > > I would kindly appreciate some help if someobody could show me (if it > is possible - ???) > how to give a figure a caption text of the same size that is used on > the text of the hole document currently set to footnotesize. > > While placing caption to figures the caption text is of the size > "normalsize" and it is desired to have a caption with font size > "footnotesize" > > Many work arounds were tried with the following commands, > \floatingfigure > \includegraphics > \epsfig > \minipage > > the web was searched and some books consulted with out success I think you will find the caption package a great relief then. Be sure to grab the latest version from CTAN, see <http://www.ctan.org/info?id=caption>. -- Morten Perfe...

Font name in Windows font dialogs
Hello dear newsgroup readers, When i look into the Microsoft Word font chooser, I see all fonts rendered with the glyphs they contain, except "Windings", "MS Outlook" and some others. My own barcode font now is rendered with its name shown in the symbols of my font which makes really hard to distinguish from other barcode fonts in the drop down list. How do i make windows to show my font name without using the glyphs from my font? With best regards, Daniel Migowski Daniel Migowski wrote: > Hello dear newsgroup readers, > > When i look...

How to figure out font file from font name
Acrobat Reader tells me that a certain (PdfTeX generated) PDF file contains the following fonts: SFSS0900, SFSX1728, SFRM1000, SFTI1000, SFRM1095 and SFBX1095. I would like to know to what actual font files these rather terse names happen to refer to. How can I figure that out? (I cannot find any font files with these names in my own TeX font tree, but that is perhaps simply because I do not, at present, have these particular fonts installed on my system). Many thanks in advance for any ideas, Christian "Christian Stapfer" <nobody@nowhere.nil> schrieb im...

Change font and font size in .vimrc ?
Hi all, How to change font and font size in .vimrc ? Thanks! Davy In article <1155195867.503512.252150@m73g2000cwd.googlegroups.com>, "Davy" <zhushenli@gmail.com> wrote: > Hi all, > > How to change font and font size in .vimrc ? > > Thanks! > Davy :help guifont :set guifont=* :set guifont=a\ font\ name\ 14 Bob Harris ...

font editing software for tex fonts?
In my one foray into creating a virtual font, which was a replacement for the math italic font for use with Times Roman, the *really* tedious part was adjusting the font metrics. Are there are wysiwig font editors for tex font metrics? (I've seen VTeX's TFM Editor, but it only works for fonts in VTeX's IF4 format and I don't think it can be used with virtual fonts.) How about the following alternative? Use a PostScript font editor to create a composite type 1 font, adjust the metrics in that font editor, and then use afm2tfm? I see a couple problems with this approach:...

Combining Math Fonts with Text Fonts
Dear all, I have two questions. 1) Are there any solid guidelines about what properties a math font should have if you want tp combine it with a given text font? I am aware of Stephan Hartke's A Survey of Free Math Fonts for TeX and LaTeX'' but this just'' lists some nice combinations; it doesn't list the guidelines. I'd be much obliged if anybody could provide me with some pointers. 2) I am thinking of buying a font licence for FF Nexus, but I need some advice for a good accompanying math font. Unfortunately, the licence is pretty expensive: it would be a pitty to buy it and then find that there's no nice accompanying math font. One of the main reasons why I'd like to use FF Nexus is because it has a serif, a sans serif, a slab serif, and a typewriter typeface which go very well together. I'm thinking of using the serif for the main text, the sans serif for captions, the slab serif for section titles, and the typewriter for identifiers. (You may find more information about FF Nexus on http://www.martinmajoor.com/4_nexus.html.) Again, I'd be much obliged for suggestions. It would be nice if you could let me know why you think a particular suggestion is nice. Of course, ideally the math font should be free. Thanks in advance for your help. Regards, Marc van Dongen Le 06/06/2011 06:58, Marc van Dongen a �crit : > Dear all, > > > I have two questions. > > 1) Are there any solid guidelines about what pr...

Font display name
In making a transition from LaTeX to XeLaTeX, I'm stumped finding out the font display name. I have the Arphic Chinese fonts installed, but what are their display names? In LaTeX, things work fine. I had in the preface: \newenvironment{SChinese}{\CJKfamily{gbsn}}{} and in the body: \begin{CJK*}{UTF8}{}\CJKfamily{gbsn}(\small{无为})\end{CJK*} This was no problem. But XeLaTeX wants me to specify the display names. I've tried a wide variety of names, but none have printed the characters (by running xpdf on the pdf file). For example: \newfontlanguage{Chinese~Simplified}{ZHS} 无为 Haines Brown ...

List of standard fonts (font names) in TeXLive?
I'd appreciate a pointer to a downloadable list of all the standard Computer Modern fonts and Adobe "basic" fonts available for use in Plain TeX, using TeXShop and pdftex, in a "vanilla" installation of TeXLive 2010 on a Mac. [Since I've just been doing some frustrating online searching for such a list, let me say more explicitly what I want. Suppose I want to define a font for section titles by coding \font\sectiontitlefont = font_name_string at xx pt and then use it repeatedly in inputs like {\sectiontitlefont This Is the Section Tit...

wxHTML font size: How to make small fonts
Hi all, If I use <FONT SIZE=-2> with wxHtmlWindow, I get smaller fonts than default ones. Fonts are still too large. How can I make then even smaller? Rgds, Mikko --Boundary-02=_eqYeAgvseF6AOep Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Mikko wrote: > If I use <FONT SIZE=3D-2> with wxHtmlWindow, I get smaller fonts than > default ones. Fonts are still too large. How can I make then even > smaller? wxHtmlWindow::SetFonts(). VS =2D-=20 PGP key: 0x465264C9,...

Font embedding problem: coded font names?
I've received a TeXShop-generated PDF file from a colleague in which many of the math symbols in the equations don't print or have obviously incorrect substitutions when I try to print it using Acrobat. I also get Acrobat warnings like "Unable to find font ABCXYZ+CMR10; Courier substituted". Converting the PDF file to a Postscript (.ps) file and examining this with a text editor shows that all of the dozen or so font names appearing in the file have been renamed from standard TeX names cmr10, cmmi10, etc., to the form "ABCXYZ+CMR10", etc, where "A...

Find the font file name from fonts.dir?
I have: the XLFD such as -monospace-Arial-bold-.... I want: the font file name such as "arialbd.ttf" (for Arial bold) which I need for the PDFLib as to export PDF documents. I've noticed that both values are listed in the font directories in a file called fonts.dir (clever me ;). Now my question: does there exist some XLib API call which does that for me? XListFonts only returns me matching XLFDs, given a certain XLFD which is is not what I want. Or can anyone point me to some sample code which does this job (iterate over all directories in the font path as returne...

Web resources about - How to display a font name and font sizes - comp.text.tex

Comparison of display technology - Wikipedia, the free encyclopedia
CRTs use an electron beam, scanning the display, flashing a lit image. If interlacing is used, a single full-resolution image results in two ...

Target store displays video games in cigarette-style plain packaging
South Australian Target believes it is acting in accordance with state rules on R18+ video games, and the weirdest part is it might be right. ...

How the Samsung Galaxy S7 Edge pulls off its curved display
... “variants” or “models” of the same smartphone can be a bit misleading. The technology that goes into making the S7 Edge’s curved display is ...

Dealmaster: Get a Dell Inspiron 15 7000 laptop with a 4K IPS display for just $650 ... One of our featured deals drastically cuts the price of a 4K laptop: you can get a Dell Inspiron 15 7000 notebook, complete with 4K IPS display, ... Universal Display: Gabelli Upbeat on OLED Production Outlook Gabelli & Co .’s Hendi Susanto today reiterates a Buy rating on shares of organic light-emitting diode technology maker Universal Display ( OLED ... Israel-U.S. tension on display as Netanyahu nixes visit White House said it was "surprised" to learn via media that Israeli leader wasn't coming in March, but the Israel says it doesn't know why Trump displays steak, water, wine to defend business record After winning the day's two biggest prizes in the Republican race for president, Donald Trump was in the mood to celebrate. New NES emulator displays classic games in 3D 3DNES, a new web-based emulator for the Nintendo Entertainment System that displays games as if they were made in 3D, has been publicly released ... CPT, HannStar Display sees decreased February revenues TFT-LCD panel makers Chunghwa Picture Tubes (CPT) and HannStar Display have reported February consolidated revenues of NT$2.796 billion (US\$83.7 ...

Watch Keanu Reeves Display Impressive Action Skills at a Gun Range for 'John Wick: Chapter Two'
Watch Keanu Reeves Display Impressive Action Skills at a Gun Range for 'John Wick: Chapter Two'

Resources last updated: 3/10/2016 6:03:01 PM