From 7eef8355c79812f364f710ad51ca9d666dfcf07e Mon Sep 17 00:00:00 2001 From: Olivier Couet <olivier.couet@cern.ch> Date: Thu, 24 Mar 2016 10:29:25 +0100 Subject: [PATCH] With the Cocoa backend on Mac the Angstroem characters did not render correctly. --- README/ReleaseNotes/v608/index.md | 2 ++ graf2d/graf/src/TLatex.cxx | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README/ReleaseNotes/v608/index.md b/README/ReleaseNotes/v608/index.md index fc8e3402fc4..2bdc80f25fe 100644 --- a/README/ReleaseNotes/v608/index.md +++ b/README/ReleaseNotes/v608/index.md @@ -175,6 +175,8 @@ We added a cache specifically for the fast option of the TTreeCloner to signific This problem was mentioned [here](https://sft.its.cern.ch/jira/browse/ROOT-8021) * Make sure that `TLatex` text strings containing "\" (ie: rendered using `TMathText`) produce an output in PDF et SVG files. +* In TLatex, with the Cocoa backend on Mac the Angstroem characters did not render correctly. + This problem was mentioned [here](https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=21321) ## 3D Graphics Libraries diff --git a/graf2d/graf/src/TLatex.cxx b/graf2d/graf/src/TLatex.cxx index 11affeea90d..93a0c766b30 100644 --- a/graf2d/graf/src/TLatex.cxx +++ b/graf2d/graf/src/TLatex.cxx @@ -1312,8 +1312,13 @@ TLatex::TLatexFormSize TLatex::Analyse(Double_t x, Double_t y, TextSpec_t spec, char letter = '\243' + opSpec; if(opSpec == 75 || opSpec == 76) { newSpec.fFont = GetTextFont(); - if (opSpec == 75) letter = '\305'; // AA Angstroem - if (opSpec == 76) letter = '\345'; // aa Angstroem + 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 + } } if(opSpec == 80 || opSpec == 81) { if (opSpec == 80) letter = '\042'; // #forall -- GitLab