Comments (10)
Hi Rogério,
Thank you very much!
Indeed I am considering math support, but if I see it correctly, it needs italic and bold to be usable, so those cuts have to be done first.
For use with pdfLaTeX, by the way, one could consider adopting the mathdesign package for FS Garamond, which fits metrically quite will with EB Garamond. That, however, would need the creation of TeX-fonts from EB-Garamond.
from eb-garamond.
There is a way to use EB Garamond for maths in LaTeX right now with unicode-math
:
\usepackage[math-style=french]{unicode-math}
\setmathfont{XITS Math} % base font
\setmathfont[range=\mathup/{latin,Latin,greek,Greek}]{EBGaramond12-Regular}
\setmathfont[range=\mathit/{latin,Latin}]{EBGaramond12-Italic}
Works with the latest TeXLive version of LuaLaTeX at least. I didn't test it elsewhere. Not perfect though, the kerning is sometimes wrong and the greek italic letters may look weird if you are used to XITS Math.
from eb-garamond.
Interesting idea, thanks, @Evpok !
from eb-garamond.
I second the request for math support and I too think the font is becoming very beautiful.
Besides the Evpok approach there's another option, both have their own issues, and unfortunately the two approaches can't be combined.
In Evpok's case the numerals, at least for me, when I compile with XeLaTeX, remain in the XITSMath font and so do the bold math fonts and subscripts.
When instead of using the unicode-math
package, one uses the mathspec
package and the following commands:
\setallmainfonts[Ligatures=TeX, Numbers=OldStyle, AutoFakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
for OldStyle numbers in both main body and math, and
\setmainfont[Ligatures=TeX, Numbers=OldStyle, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
\setmathsfont(Digits)[Ligatures=TeX, Numbers={Lining}, AutoFakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
\setmathsfont(Greek)[Ligatures=TeX, Numbers={Lining}, AutoFakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
\setmathsfont(Latin)[Ligatures=TeX, Numbers={Lining}, AutoFakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
\setmathrm[Ligatures=TeX, Numbers={Lining}, AutoFakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
for OldStyle numbers in main body and Lining numbers in math.
With these commands all math is typeset in EB Garamond, but one looses the \mathbb
and \mathcal
fonts, for which one needs to find separate typefaces. But the biggest issue is the loss of quality in symbols like fences, ... which are now bitmapped. Preceding the commands by
\usepackage[unicode-math]
\setmathfont{Asana-Math.otf}
solves the symbols, \mathbb
and \mathcal
issue, but creates a new ones; at least the bold math font and the greek alphabet are no longer EB Garamond. I haven't figured out how to solved these issues, yet.
from eb-garamond.
It seems that in the end the @Evpok way is the way to go :)
The solution to my previous post is:
\usepackage[math-style=french,bold-style=TeX]{unicode-math}
\setmathfont{Asana Math} % base font
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}, Ligatures=TeX, Numbers={Lining}, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}, Ligatures=TeX, Numbers={Lining}, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EBGaramond12-Italic}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}, Ligatures=TeX, Numbers={Lining}, FakeBold=1.5, SizeFeatures={{Size=-8, OpticalSize=8},{Size= 8-, OpticalSize=12}}]{EB Garamond}
with this one sets math (lining numbers, lowercase, uppercase, greek, uppercase greek) in EB Garamond, in upright, italic and a fake bold variant (only upright). The remaining math symbols are typeset using the Asana Math typeface.
from eb-garamond.
That's almost what I was about to answer to your first comment :) except that I stick to XITS and that I do use EBGaramond-Bold (yes, I like challenges :)
from eb-garamond.
The method @Evpok and @itzsimpl describe works quite well for me, too, but accents above italic characters are slightly displaced. Is there a workaround for this as well?
from eb-garamond.
A specific mathfont to go with EB Garamond would perhaps be the most beautiful solution.
But I find I very much like the combination of EB Garamond and (Neo) Euler,
in particular setting
\setmathfont[Scale=MatchLowercase,math-style=upright,vargreek-shape=unicode]{Neo Euler}
from eb-garamond.
Recently @YuanshengZhao has created a math font with OpenType support: see https://github.com/YuanshengZhao/Garamond-Math
from eb-garamond.
That one can be a good starting point for the parts (XTIS) with a correct license (OFL)! The TeX Gyre parts are GFL/LPPL which isn't quite compatible though. Perhaps replace Thermes with STIX/XTIS? Both are Times-like anyway…
(Yeah, Math fonts are messy – in addition to the symbols, you need to make a bunch of new letter styles and all that…)
from eb-garamond.
Related Issues (20)
- Todo list for v2 HOT 2
- Changes to /f and /longs in italic fonts HOT 1
- Should I Use the TTF or OTF Version for a Printed Document? HOT 2
- Move the Long-Tailed “Q” From Contextual Alternates to a Stylistic Set HOT 2
- Alternate ‘fl’ Ligature
- Shorter Punctuation for Small Caps
- Issues With Q With Diaeresis
- ‘T’ and ‘h’ Are Too Close to Each Other
- Many letters suffer from wrong outlines HOT 1
- Collision avoidance for Lithuanian text
- Small caps feature for dotted/dotless i should be available for other Turkic languages HOT 1
- Add stylised variant for Vietnamese HOT 1
- Add historical variant for Vietnamese i-hook
- Collision avoidance for її
- Set kernings for u-horn and o-horn HOT 1
- BitBucket repo HOT 6
- [08 Sizes] Symbol Variants HOT 2
- [08 Sizes] No-Break Spaces
- Problem with diacritic «Combining Vertical Line Above» (U+030D)
- Please add a bold font HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eb-garamond.