#StackBounty: #tikz-arrows How make TikZ arrow tips match arrows with TeX Gyre Termes Math font?

Bounty: 50

How can I (globally in the document, I hope) change the shape of TikZ arrowheads (including those in tikzcd environments) so match the arrowheads from the TeX Gyre Terms Math font (using XeLaTeX)?

The style Straight Barb almost matches, but the ends of the barbs are different: in TeX Gyre Termes Math, the ends of the barbs are horizontal, whereas in TikZ Straight Barb heads, the ends of the bars are perpendicular to the body of the barb.

documentclass[12pt]{article}
usepackage[left=2.5in,right=2.5in]{geometry}

usepackage{tikz-cd}
usetikzlibrary{arrows.meta,decorations.markings}
tikzset{
  >={Straight Barb[scale=0.8]},
  commutative diagrams/arrow style=tikz
}

usepackage{fontspec}
usepackage{unicode-math}
setmainfont{TeX Gyre Termes}[Scale=1.0]
defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX}
setmathfont{TeX Gyre Termes Math}

begin{document}

large
begin{equation}    % eq 1
  A longrightarrow B rightarrow C
end{equation}
%
begin{equation}    % eq 2
  begin{tikzcd}
    A arrow[r,thick] {$f$} & B
  end{tikzcd}
end{equation}

end{document}

Different barb end angles, TikZ and TeX Gyre Termes Math

Related: How make TikZ arrow tips match tips of newtxmath font's arrows?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.