how to use fonts.conf to select specific font - highcharts

fonts.conf newbie!
I have a font family containing 19 different styles. These range from the usual Bold, Italic, Bold Italic etc to Condensed Light, Condensed Light Italic, Thin Italic, Black, ...
I have an app (highcharts) that uses JSON that can contain fontFamily and, optionally, fontStyle. The app appears to be accessing the fonts.conf.
My question is: what should the fonts.conf look like that will take something like:
fontFamily: "CModernCondLtIt"
and select the physical font file: CModern-CondLight-Italic.ttf
Assuming that the output of fc-list -v shows:
... family: "Ch Modern"(s)
style: "Condensed Light Italic"(s) "Cond Light Italic"(s)
fullname: "Ch Modern Cond Light Italic"(s)
file: "/usr/share/fonts/CModern-CondLight-Italic.ttf"(s)
Would I use match or alias?
and what would the XML look like?

Related

How to make parenthetical citations in small font using a lua-filter via pandoc?

I would like to write all parenthetical citations in small fonts when I produce HTML/revealjs outputs from markdown using pandoc. Putting <small>...</small> tags around the [#citation] notation (e.g. <small>[#citation]</small>) can be the way to achieve that effect, but I just leave [#citation]s as they are since there are a lot of [#citation] in my multiple .md files.
I came up with the following lua-filter (say small-parencite.lua) that selectively makes the font size of parenthetical citations small. However, this lua-filter does not change the font size of any parenthetical citation.
Cite = function(cite)
content = cite.content
-- if FORMAT:match 'html' or FORMAT:match 'revealjs' then
if cite.citations == 'NormalCitation' then
pandoc.Str('<small>' .. content .. '</small>')
end
-- end
return cite
end
Does anybody point out what I am missing in that lua-filter? Note that I want the font size of narrative citations to remain the same as normal texts as shown below:
MWE
small-parencite.lua
Cite = function(cite)
content = cite.content
-- if FORMAT:match 'html' or FORMAT:match 'revealjs' then
if cite.citations == 'NormalCitation' then
pandoc.Str('<small>' .. content .. '</small>')
end
-- end
return cite
end
test.md
---
output:
html_document:
md_extensions: -ascii_identifiers
pandoc_args:
- small-parencite.lua
references:
- author:
- family: Allaire
given: JJ
- family: Xie
given: Yihui
- family: McPherson
given: Jonathan
- family: Luraschi
given: Javier
- family: Ushey
given: Kevin
- family: Atkins
given: Aron
- family: Wickham
given: Hadley
- family: Cheng
given: Joe
- family: Chang
given: Winston
- family: Iannone
given: Richard
id: R-rmarkdown
issued: 2020
note: R package version 2.3
title: "rmarkdown: Dynamic Documents for R"
title-short: rmarkdown
type: book
url: "https://github.com/rstudio/rmarkdown"
- author:
- family: Xie
given: Yihui
edition: 2nd
id: knitr2015
issued: 2015
note: ISBN 978-1498716963
publisher: Chapman; Hall/CRC
publisher-place: Boca Raton, Florida
title: Dynamic Documents with R and knitr
type: book
url: "https://yihui.org/knitr/"
---
I want to write all parenthetical citations in small fonts like this:
This is knitr <small>[#knitr2015]</small>.
But I do not want to use `<small>...</small>` tags (e.g. `<small>[#citation]</small>`) to achieve that effect. I just leave `[#citation]`s as they are like this:
This is knitr [#knitr2015]
Note that I want the font size of narrative citations to remain the same as normal texts as shown below:
This is a markdown variant by #R-rmarkdown.
# References
Is this what you want?
function Cite(el)
if el.citations[1].mode == 'NormalCitation' then
return {
pandoc.RawInline("html", "<small>"),
el,
pandoc.RawInline("html", "</small>")
}
end
end

How do I change the font in markdown pandoc?

I am writing a document in markdown, and I read that I could change the font to Arial like this:
---
fontfamily: arev
---
But it did not work. But when I try to change the font to Times, it's working fine
---
fontfamily: times
---
So how do I change the font to Arial?
If Helvetica is "good enough" you can use:
fontfamily: helvet
header-includes:
- \renewcommand{\familydefault}{\sfdefault}
Pandoc uses LaTeX per default for PDF generation, so it depends on your TeX installation.
If you're on TeX Live you can use most in this font catalogue.

Formatting Slack notification from Travis

Is it possible to format a Slack notification template in Travis, in order to use bold, italic and links?
Have you tried using slack emphasis (basically it is like markdown) text?
Try surrounding words in ** like *so* for bold.
*bold* will show as bold
_itaic_ will show as italic
~strikethrough~ will show as strikethrough
>will indent a line
>>> will indent multiple paragraphs
Source:
https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages
As for links refer to: https://api.slack.com/docs/message-formatting

How do I organize block elements with translation in slim template engine

Let's say we have a paragraph element block <p> which has different children elements such as <strong>.
From the same content in different language, the order may be different. For example:
English:
This is a paragraph with sample content and bold content here and italic here.
Corresponding Slim will be
p
| This is a paragraph with sample content and
b bold content
| here and
em italic here
Now we have chinese, due to the difference in language semantics, may result in difference in the bold text / italic text position:
Chinese: Bold的字 和 italic的字 會在不同位置出現。
Resulting Slim becomes:
p
b Bold的字
| 和
em italic的字
| 會在不同位置出現。
I wonder what is the best way to organize translation content? Can I still store them in .yml file?

Replacing \emptyset symbol with one from a different font family in LaTeX

So I quite like the Anttor fonts and I'd like to use them in LaTeX. Everything is nice, except the \emptyset symbol is ugly. I'd like to just \renewcommand the null set command, but I can't work out how to call, say, the computer modern \emptyset when using a different font family everywhere else.
Is there a quick way to do this?
\font\cmsy = cmsy10 at 12pt
\hbox{\cmsy \char 59}
\font\msbm = msbm10 at 12pt
\hbox{\msbm \char 63}
(source: imageban.ru)

Resources