# Angstrom symbol refuses to render correctly using TLatex

**URL:** <https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850>\
**Category:** ROOT\
**Created:** [March 22, 2016, 11:17pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850 "2016-03-22T23:17:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![buckleygeer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/22d042/32.png) [@buckleygeer](https://root-forum.cern.ch/u/buckleygeer)\
**Post date:** [March 22, 2016, 11:17pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/1 "2016-03-22T23:17:13Z")

</div>

I am trying to make a plot where the axis label includes the symbol for Angstrom #AA. This symbol keeps getting rendered as the symbol for “approximately equal”, namely #approx. This macro used to work with ROOT 5.34.25 which is the version I had installed. I tried 6.06 but it doesn’t help. There must be something screwy on my MAC with rendering stuff from the Symbol font. Other symbols such as Greek letters are okay, although I haven’t done an exhaustive check. Any suggestions.

Thanks Liz

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 23, 2016, 8:45am UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/2 "2016-03-23T08:45:33Z")

</div>

Yes you are right. I just check. That’s only on screen with the Cocoa version of ROOT . If you use the X11 version or save the image as PDF it is OK. We will look into that.

---

<div class="post-metadata">

**Author:** ![buckleygeer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/22d042/32.png) [@buckleygeer](https://root-forum.cern.ch/u/buckleygeer)\
**Post date:** [March 23, 2016, 3:34pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/3 "2016-03-23T15:34:52Z")

</div>

So I am using XQuartz on MAC 10.9.5 and I built from source. If I save it as PDF then I also see the symbol correctly but not if I save as a PNG file and not on the screen.

By the way, on a completely unrelated note. ROOT 6.06 does not pick up changes to a script if I edit it and then rerun it. I have to quit the session. Unloading it doesn’t seem to work.

Liz

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 23, 2016, 3:55pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/4 "2016-03-23T15:55:46Z")

</div>

> [@](#):
>
> So I am using XQuartz on MAC 10.9.5 and I built from source. If I save it as PDF then I also see the symbol correctly but not if I save as a PNG file and not on the screen.

By default on mac when you build ROOT the cocoa backend is used. This has the problem. To use the Quartz backend you should configure root with cmake using -Dcocoa=OFF -Dx11=ON options. We are now looking at this problem for cocoa. Obfully it will be fixed soon.

> [@](#):
>
> By the way, on a completely unrelated note. ROOT 6.06 does not pick up changes to a script if I edit it and then rerun it. I have to quit the session. Unloading it doesn’t seem to work.

When you have a new question it is better to make a new post otherwise the forum becomes very confusing.  
Any way this is a known issue: [sft.its.cern.ch/jira/browse/ROOT-7858](https://sft.its.cern.ch/jira/browse/ROOT-7858)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 24, 2016, 9:31am UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/5 "2016-03-24T09:31:27Z")

</div>

Now fixed. Thanks to have seen it.

---

<div class="post-metadata">

**Author:** ![buckleygeer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/22d042/32.png) [@buckleygeer](https://root-forum.cern.ch/u/buckleygeer)\
**Post date:** [March 24, 2016, 6:41pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/6 "2016-03-24T18:41:41Z")

</div>

Thanks. Is there a fixed version that I can download?

```
Liz
```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 24, 2016, 6:46pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/7 "2016-03-24T18:46:52Z")

</div>

ROOT 6 master.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 24, 2016, 6:47pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/8 "2016-03-24T18:47:42Z")

</div>

If you install ROOT from source I can send you the few line to add.

---

<div class="post-metadata">

**Author:** ![buckleygeer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/22d042/32.png) [@buckleygeer](https://root-forum.cern.ch/u/buckleygeer)\
**Post date:** [March 24, 2016, 9:36pm UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/9 "2016-03-24T21:36:54Z")

</div>

> [@couet](#):
>
> If you install ROOT from source I can send you the few line to add.

Yes I did so that would be very useful.

Thanks Liz

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 29, 2016, 8:44am UTC](https://root-forum.cern.ch/t/angstrom-symbol-refuses-to-render-correctly-using-tlatex/20850/10 "2016-03-29T08:44:03Z")

</div>

in $ROOTSYS/graf2d/graf/src/TLatex.cxx search for the text string “Angstrom” and replace:

```auto
      if(opSpec == 75 || opSpec == 76) {
         newSpec.fFont = GetTextFont();
         if (opSpec == 75) letter = '\305'; // AA Angstroem
         if (opSpec == 76) letter = '\345'; // aa Angstroem
      }
```

by:

```auto
      if(opSpec == 75 || opSpec == 76) {
         newSpec.fFont = GetTextFont();
         if (gVirtualX->InheritsFrom("TGCocoa")) {
            if (opSpec == 75) letter = '\201'; // AA Angstroem
            if (opSpec == 76) letter = '\214'; // aa Angstroem
         } else {
            if (opSpec == 75) letter = '\305'; // AA Angstroem
            if (opSpec == 76) letter = '\345'; // aa Angstroem
         }
      }
```
