public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mattias Ellert <mattias.ellert@physics.uu.se>
To: git-commits@fedoraproject.org
Subject: [rpms/root] epel8: Rebuild for pythia8 8.3.18
Date: Fri, 16 Oct 2026 09:02:03 GMT [thread overview]
Message-ID: <179214132328.1.17718060863051575826.rpms-root-80dd7def7cfb@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/root
Branch : epel8
Commit : 80dd7def7cfb1cbcf844e1df735099e2c472e987
Author : Mattias Ellert <mattias.ellert@physics.uu.se>
Date : 2026-10-16T09:40:36+02:00
Stats : +601/-217 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/root/c/80dd7def7cfb1cbcf844e1df735099e2c472e987?branch=epel8
Log:
Rebuild for pythia8 8.3.18
Use the URW fonts (Nimbus Roman/Sans/Mono) for text for consistency
Use the normal text fonts for cyrillic in TMathText
Fix calculation of kerning distances in generated PDF files
---
diff --git a/root-Adjust-stressGraphics-reference.patch b/root-Adjust-stressGraphics-reference.patch
new file mode 100644
index 0000000..621666a
--- /dev/null
+++ b/root-Adjust-stressGraphics-reference.patch
@@ -0,0 +1,25 @@
+From 000c08c1723c7c907f995538994c539f12551715 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Fri, 16 Oct 2026 07:00:11 +0200
+Subject: [PATCH] Adjust stressGraphics reference
+
+---
+ test/stressGraphics.ref | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/stressGraphics.ref b/test/stressGraphics.ref
+index e3676cfff37..0881241625b 100644
+--- a/test/stressGraphics.ref
++++ b/test/stressGraphics.ref
+@@ -12,7 +12,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
+ 11 12971 100 14444 50 34063 2000 32033 1200 12864 150
+ 12 7674 100 13533 50 83557 3000 38505 4000 7720 150
+ 13 5600 400 13242 300 16881 400 15063 800 5638 400
+- 14 14190539 4000000 12926 100 23076 9500 25987 3000 14190704 4000000
++ 14 14190539 5000000 12926 100 23076 9500 25987 3000 14190704 5000000
+ 15 15690 5000 17179 200 23076 9500 15202 900 10437 5000
+ 16 28072 400 23287 200 44462 11000 30062 5000 38007 400
+ 17 20444 400 21520 150 27511 11000 16867 600 20721 400
+--
+2.56.0
+
diff --git a/root-Use-the-normal-text-font-for-cyrillic.patch b/root-Use-the-normal-text-font-for-cyrillic.patch
new file mode 100644
index 0000000..51c35e1
--- /dev/null
+++ b/root-Use-the-normal-text-font-for-cyrillic.patch
@@ -0,0 +1,61 @@
+From ac6455240b7b596f121575d825728e5c05c23e12 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Wed, 14 Oct 2026 18:44:14 +0200
+Subject: [PATCH] Use the normal text font for cyrillic
+
+The system Droid Sans Fallback font has no cyrillic letters.
+---
+ graf2d/graf/src/TMathText.cxx | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/graf2d/graf/src/TMathText.cxx b/graf2d/graf/src/TMathText.cxx
+index db37252c02c..025df3c6e51 100644
+--- a/graf2d/graf/src/TMathText.cxx
++++ b/graf2d/graf/src/TMathText.cxx
+@@ -90,11 +90,6 @@ private:
+
+ return precision;
+ }
+- inline bool is_cyrillic_or_cjk(const wchar_t c) const
+- {
+- return mathtext::math_text_renderer_t::is_cyrillic(c) ||
+- mathtext::math_text_renderer_t::is_cjk(c);
+- }
+ inline size_t root_cjk_face_number(
+ const bool serif = false) const
+ {
+@@ -228,9 +223,8 @@ public:
+ const unsigned int family)
+ {
+ const size_t old_font_index = TTF::fgCurFontIdx;
+- const bool cyrillic_or_cjk = is_cyrillic_or_cjk(character);
+
+- if (cyrillic_or_cjk) {
++ if (mathtext::math_text_renderer_t::is_cjk(character)) {
+ TTF::SetTextFont((Font_t) root_cjk_face_number());
+ } else {
+ TTF::SetTextFont((Font_t) root_face_number(family));
+@@ -308,9 +302,9 @@ public:
+ buf[1] = L'\0';
+ for (std::wstring::const_iterator iterator = string.begin(); iterator != string.end(); ++iterator) {
+ buf[0] = *iterator;
+- const bool cyrillic_or_cjk = is_cyrillic_or_cjk(buf[0]);
++ const bool is_cjk = mathtext::math_text_renderer_t::is_cjk(buf[0]);
+
+- if (cyrillic_or_cjk) {
++ if (is_cjk) {
+ SetTextFont((Font_t) root_cjk_face_number());
+ TAttText::Modify();
+ }
+@@ -323,7 +317,7 @@ public:
+ transform_pad(xt, yt, x + advance, y);
+ gPad->PaintText(xt, yt, buf);
+ advance += b.advance();
+- if (cyrillic_or_cjk) {
++ if (is_cjk) {
+ SetTextFont((Font_t) root_face_number(family));
+ TAttText::Modify();
+ }
+--
+2.56.0
+
diff --git a/root-fontconfig.patch b/root-fontconfig.patch
index 155fc00..4437769 100644
--- a/root-fontconfig.patch
+++ b/root-fontconfig.patch
@@ -1,22 +1,29 @@
-From 494353496adc70f1f4d1b4d77a53d510c7a30e2d Mon Sep 17 00:00:00 2001
+From 429970d480deec70eb55e1ce257e2f1c4496c3dd Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
-Date: Sat, 11 May 2024 20:09:47 +0200
+Date: Thu, 15 Oct 2026 16:02:18 +0200
Subject: [PATCH] Use system fonts via fontconfig
---
- core/base/src/TApplication.cxx | 11 +-
- graf2d/asimage/CMakeLists.txt | 1 +
- graf2d/asimage/src/TASImage.cxx | 91 +++++++-
- graf2d/graf/CMakeLists.txt | 1 +
- graf2d/graf/inc/TTF.h | 3 +-
- graf2d/graf/src/TTF.cxx | 295 +++++++++++++++++---------
- graf2d/postscript/CMakeLists.txt | 1 +
- graf2d/postscript/src/TPostScript.cxx | 106 ++++-----
- graf3d/gl/CMakeLists.txt | 1 +
- graf3d/gl/src/TGLFontManager.cxx | 123 ++++++++++-
- graf3d/gl/src/TGLText.cxx | 56 +++--
- gui/gui/src/TGApplication.cxx | 10 +-
- 12 files changed, 496 insertions(+), 203 deletions(-)
+ core/base/src/TApplication.cxx | 11 +-
+ graf2d/asimage/CMakeLists.txt | 1 +
+ graf2d/asimage/src/TASImage.cxx | 91 +++++++-
+ graf2d/graf/CMakeLists.txt | 1 +
+ graf2d/graf/inc/TTF.h | 3 +-
+ graf2d/graf/src/TTF.cxx | 295 +++++++++++++++++--------
+ graf2d/postscript/CMakeLists.txt | 1 +
+ graf2d/postscript/src/TPostScript.cxx | 130 +++++------
+ graf3d/eve/src/TEveCaloLegoGL.cxx | 2 +-
+ graf3d/eve/src/TEveCaloLegoOverlay.cxx | 8 +-
+ graf3d/gl/CMakeLists.txt | 1 +
+ graf3d/gl/inc/TGLFontManager.h | 3 -
+ graf3d/gl/src/TGLAnnotation.cxx | 2 +-
+ graf3d/gl/src/TGLCameraOverlay.cxx | 4 +-
+ graf3d/gl/src/TGLFontManager.cxx | 141 +++++-------
+ graf3d/gl/src/TGLOverlayButton.cxx | 2 +-
+ graf3d/gl/src/TGLPadPainter.cxx | 11 +-
+ graf3d/gl/src/TGLText.cxx | 56 +++--
+ gui/gui/src/TGApplication.cxx | 10 +-
+ 19 files changed, 461 insertions(+), 312 deletions(-)
diff --git a/core/base/src/TApplication.cxx b/core/base/src/TApplication.cxx
index 69c42bdd1c1..05f8803a879 100644
@@ -64,7 +71,7 @@ index 31114ad45d4..be95419491b 100644
Core
Graf
diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx
-index 7e046f4724b..137265bd4a1 100644
+index 7e046f4724b..b5056b34837 100644
--- a/graf2d/asimage/src/TASImage.cxx
+++ b/graf2d/asimage/src/TASImage.cxx
@@ -117,6 +117,8 @@ extern "C" {
@@ -94,63 +101,63 @@ index 7e046f4724b..137265bd4a1 100644
+
+ if (strcmp(basename, "timesi.ttf") == 0 ||
+ strcmp(basename, "FreeSerifItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:italic");
+ }
+ else if (strcmp(basename, "timesbd.ttf") == 0 ||
+ strcmp(basename, "FreeSerifBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:bold");
+ }
+ else if (strcmp(basename, "timesbi.ttf") == 0 ||
+ strcmp(basename, "FreeSerifBoldItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:bold:italic");
+ }
+ else if (strcmp(basename, "arial.ttf") == 0 ||
+ strcmp(basename, "FreeSans.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans");
++ pat = FcNameParse ((const FcChar8*) "nimbussans");
+ }
+ else if (strcmp(basename, "ariali.ttf") == 0 ||
+ strcmp(basename, "FreeSansOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:italic");
+ }
+ else if (strcmp(basename, "arialbd.ttf") == 0 ||
+ strcmp(basename, "FreeSansBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:bold");
+ }
+ else if (strcmp(basename, "arialbi.ttf") == 0 ||
+ strcmp(basename, "FreeSansBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:bold:italic");
+ }
+ else if (strcmp(basename, "cour.ttf") == 0 ||
+ strcmp(basename, "FreeMono.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops");
+ }
+ else if (strcmp(basename, "couri.ttf") == 0 ||
+ strcmp(basename, "FreeMonoOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:italic");
+ }
+ else if (strcmp(basename, "courbd.ttf") == 0 ||
+ strcmp(basename, "FreeMonoBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:bold");
+ }
+ else if (strcmp(basename, "courbi.ttf") == 0 ||
+ strcmp(basename, "FreeMonoBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:bold:italic");
+ }
+ else if (strcmp(basename, "symbol.ttf") == 0) {
+ pat = FcNameParse ((const FcChar8*) "standardsymbolsps");
+ }
+ else if (strcmp(basename, "times.ttf") == 0 ||
+ strcmp(basename, "FreeSerif.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman");
+ }
+ else if (strcmp(basename, "wingding.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "dingbats");
++ pat = FcNameParse ((const FcChar8*) "d050000l");
+ }
+ else if (strcmp(basename, "BlackChancery.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "urwchanceryl");
++ pat = FcNameParse ((const FcChar8*) "z003");
+ }
+ else if (gSystem->AccessPathName(fn, kReadPermission) != 0) {
-+ // Font name is not a file - usae as pattern
++ // Font name is not a file - use as pattern
+ pat = FcNameParse ((const FcChar8*) fn.Data());
+ }
+
@@ -208,7 +215,7 @@ index 0bef9dcb959..ea96fe47ce3 100644
static TTF::TTGlyph fgGlyphs[kMaxGlyphs]; ///< glyphs
static Bool_t fgHinting; ///< use hinting (true by default)
diff --git a/graf2d/graf/src/TTF.cxx b/graf2d/graf/src/TTF.cxx
-index b1c662eadde..55ba9d96828 100644
+index b1c662eadde..414682523de 100644
--- a/graf2d/graf/src/TTF.cxx
+++ b/graf2d/graf/src/TTF.cxx
@@ -25,6 +25,8 @@ Interface to the freetype 2 library.
@@ -277,47 +284,47 @@ index b1c662eadde..55ba9d96828 100644
+
+ if (strcmp(basename, "timesi.ttf") == 0 ||
+ strcmp(basename, "FreeSerifItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:italic");
+ }
+ else if (strcmp(basename, "timesbd.ttf") == 0 ||
+ strcmp(basename, "FreeSerifBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:bold");
+ }
+ else if (strcmp(basename, "timesbi.ttf") == 0 ||
+ strcmp(basename, "FreeSerifBoldItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman:bold:italic");
+ }
+ else if (strcmp(basename, "arial.ttf") == 0 ||
+ strcmp(basename, "FreeSans.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans");
++ pat = FcNameParse ((const FcChar8*) "nimbussans");
+ }
+ else if (strcmp(basename, "ariali.ttf") == 0 ||
+ strcmp(basename, "FreeSansOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:italic");
+ }
+ else if (strcmp(basename, "arialbd.ttf") == 0 ||
+ strcmp(basename, "FreeSansBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:bold");
+ }
+ else if (strcmp(basename, "arialbi.ttf") == 0 ||
+ strcmp(basename, "FreeSansBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbussans:bold:italic");
+ }
+ else if (strcmp(basename, "cour.ttf") == 0 ||
+ strcmp(basename, "FreeMono.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops");
+ }
+ else if (strcmp(basename, "couri.ttf") == 0 ||
+ strcmp(basename, "FreeMonoOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:italic");
+ }
+ else if (strcmp(basename, "courbd.ttf") == 0 ||
+ strcmp(basename, "FreeMonoBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:bold");
+ }
+ else if (strcmp(basename, "courbi.ttf") == 0 ||
+ strcmp(basename, "FreeMonoBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold:italic");
++ pat = FcNameParse ((const FcChar8*) "nimbusmonops:bold:italic");
+ }
+ else if (strcmp(basename, "symbol.ttf") == 0) {
+ pat = FcNameParse ((const FcChar8*) "standardsymbolsps");
@@ -325,10 +332,10 @@ index b1c662eadde..55ba9d96828 100644
+ }
+ else if (strcmp(basename, "times.ttf") == 0 ||
+ strcmp(basename, "FreeSerif.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif");
++ pat = FcNameParse ((const FcChar8*) "nimbusroman");
+ }
+ else if (strcmp(basename, "wingding.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "dingbats");
++ pat = FcNameParse ((const FcChar8*) "d050000l");
+ italic &= 2;
+ }
+ else if (strcmp(basename, "STIXGeneral.otf") == 0) {
@@ -371,13 +378,13 @@ index b1c662eadde..55ba9d96828 100644
+ pat = FcNameParse ((const FcChar8*) "stixsize5");
+ }
+ else if (strcmp(basename, "DroidSansFallback.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "droidsansfallback:charset=4e00 0410");
++ pat = FcNameParse ((const FcChar8*) "droidsansfallback:charset=4e00 AC00");
+ }
+ else if (strcmp(basename, "BlackChancery.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "urwchanceryl");
++ pat = FcNameParse ((const FcChar8*) "z003");
+ }
+ else if (gSystem->AccessPathName(fontname, kReadPermission) != 0) {
-+ // Font name is not a file - usae as pattern
++ // Font name is not a file - use as pattern
+ pat = FcNameParse ((const FcChar8*) fontname);
+ }
+
@@ -526,21 +533,21 @@ index b1c662eadde..55ba9d96828 100644
- { "Root.TTFont.CJKMing", "DroidSansFallback.ttf" },
- { "Root.TTFont.CJKGothic", "DroidSansFallback.ttf" }
+ static const char *fonttable[] = {
-+ "freesans:bold",
-+ "freeserif:italic",
-+ "freeserif:bold",
-+ "freeserif:bold:italic",
-+ "freesans",
-+ "freesans:italic",
-+ "freesans:bold",
-+ "freesans:bold:italic",
-+ "freemono",
-+ "freemono:italic",
-+ "freemono:bold",
-+ "freemono:bold:italic",
++ "nimbussans:bold",
++ "nimbusroman:italic",
++ "nimbusroman:bold",
++ "nimbusroman:bold:italic",
++ "nimbussans",
++ "nimbussans:italic",
++ "nimbussans:bold",
++ "nimbussans:bold:italic",
++ "nimbusmonops",
++ "nimbusmonops:italic",
++ "nimbusmonops:bold",
++ "nimbusmonops:bold:italic",
+ "standardsymbolsps",
-+ "freeserif",
-+ "dingbats",
++ "nimbusroman",
++ "d050000l",
+ "standardsymbolsps",
+ "stixgeneral",
+ "stixgeneral:italic",
@@ -555,9 +562,9 @@ index b1c662eadde..55ba9d96828 100644
+ "stixsize4",
+ "stixsize4:bold",
+ "stixsize5",
-+ "droidsansfallback:charset=4e00 0410",
-+ "droidsansfallback:charset=4e00 0410",
-+ "droidsansfallback:charset=4e00 0410"
++ "droidsansfallback:charset=4e00 AC00",
++ "droidsansfallback:charset=4e00 AC00",
++ "droidsansfallback:charset=4e00 AC00"
};
- static int fontset = -1;
@@ -607,7 +614,7 @@ index eb091bbb396..a05023a3f41 100644
Graf
)
diff --git a/graf2d/postscript/src/TPostScript.cxx b/graf2d/postscript/src/TPostScript.cxx
-index 09ea7ffa9c3..180fd5e3c11 100644
+index 09ea7ffa9c3..7db82822369 100644
--- a/graf2d/postscript/src/TPostScript.cxx
+++ b/graf2d/postscript/src/TPostScript.cxx
@@ -234,6 +234,7 @@ To change the color model use `gStyle->SetColorModelPS(c)`.
@@ -656,21 +663,21 @@ index 09ea7ffa9c3..180fd5e3c11 100644
- { "Root.TTFont.CJKMing", "DroidSansFallback.ttf" },
- { "Root.TTFont.CJKCothic", "DroidSansFallback.ttf" }
+ static const char *fonttable[] = {
-+ "freesans:bold",
-+ "freeserif:italic",
-+ "freeserif:bold",
-+ "freeserif:bold:italic",
-+ "freesans",
-+ "freesans:italic",
-+ "freesans:bold",
-+ "freesans:bold:italic",
-+ "freemono",
-+ "freemono:italic",
-+ "freemono:bold",
-+ "freemono:bold:italic",
++ "nimbussans:bold",
++ "nimbusroman:italic",
++ "nimbusroman:bold",
++ "nimbusroman:bold:italic",
++ "nimbussans",
++ "nimbussans:italic",
++ "nimbussans:bold",
++ "nimbussans:bold:italic",
++ "nimbusmonops",
++ "nimbusmonops:italic",
++ "nimbusmonops:bold",
++ "nimbusmonops:bold:italic",
+ "standardsymbolsps",
-+ "freeserif",
-+ "dingbats",
++ "nimbusroman",
++ "d050000l",
+ "standardsymbolsps",
+ "stixgeneral",
+ "stixgeneral:italic",
@@ -685,9 +692,9 @@ index 09ea7ffa9c3..180fd5e3c11 100644
+ "stixsize4",
+ "stixsize4:bold",
+ "stixsize5",
-+ "droidsansfallback:charset=4e00 0410",
-+ "droidsansfallback:charset=4e00 0410",
-+ "droidsansfallback:charset=4e00 0410"
++ "droidsansfallback:charset=4e00 AC00",
++ "droidsansfallback:charset=4e00 AC00",
++ "droidsansfallback:charset=4e00 AC00"
};
PrintStr("%%IncludeResource: ProcSet (FontSetInit)@");
@@ -740,20 +747,91 @@ index 09ea7ffa9c3..180fd5e3c11 100644
}
}
PrintStr("%%IncludeResource: font Times-Roman@");
-@@ -2837,10 +2843,10 @@ void TPostScript::Text(Double_t xx, Double_t yy, const wchar_t *chars)
- { "Root.PSFont.9", "/FreeMonoOblique" },
- { "Root.PSFont.10", "/FreeMonoBold" },
- { "Root.PSFont.11", "/FreeMonoBoldOblique" },
+@@ -2826,21 +2832,21 @@ void TPostScript::Text(Double_t xx, Double_t yy, const char *chars)
+ void TPostScript::Text(Double_t xx, Double_t yy, const wchar_t *chars)
+ {
+ static const char *psfont[31][2] = {
+- { "Root.PSFont.1", "/FreeSerifItalic" },
+- { "Root.PSFont.2", "/FreeSerifBold" },
+- { "Root.PSFont.3", "/FreeSerifBoldItalic" },
+- { "Root.PSFont.4", "/FreeSans" },
+- { "Root.PSFont.5", "/FreeSansOblique" },
+- { "Root.PSFont.6", "/FreeSansBold" },
+- { "Root.PSFont.7", "/FreeSansBoldOblique" },
+- { "Root.PSFont.8", "/FreeMono" },
+- { "Root.PSFont.9", "/FreeMonoOblique" },
+- { "Root.PSFont.10", "/FreeMonoBold" },
+- { "Root.PSFont.11", "/FreeMonoBoldOblique" },
- { "Root.PSFont.12", "/SymbolMT" },
-+ { "Root.PSFont.12", "/StandardSymbolsL" },
- { "Root.PSFont.13", "/FreeSerif" },
+- { "Root.PSFont.13", "/FreeSerif" },
- { "Root.PSFont.14", "/Wingdings-Regular" },
- { "Root.PSFont.15", "/SymbolMT" },
-+ { "Root.PSFont.14", "/Dingbats" },
-+ { "Root.PSFont.15", "/StandardSymbolsL" },
++ { "Root.PSFont.1", "/NimbusRoman-Italic" },
++ { "Root.PSFont.2", "/NimbusRoman-Bold" },
++ { "Root.PSFont.3", "/NimbusRoman-BoldItalic" },
++ { "Root.PSFont.4", "/NimbusSans-Regular" },
++ { "Root.PSFont.5", "/NimbusSans-Italic" },
++ { "Root.PSFont.6", "/NimbusSans-Bold" },
++ { "Root.PSFont.7", "/NimbusSans-BoldItalic" },
++ { "Root.PSFont.8", "/NimbusMonoPS-Regular" },
++ { "Root.PSFont.9", "/NimbusMonoPS-Italic" },
++ { "Root.PSFont.10", "/NimbusMonoPS-Bold" },
++ { "Root.PSFont.11", "/NimbusMonoPS-BoldItalic" },
++ { "Root.PSFont.12", "/StandardSymbolsPS" },
++ { "Root.PSFont.13", "/NimbusRoman-Regular" },
++ { "Root.PSFont.14", "/D050000L" },
++ { "Root.PSFont.15", "/StandardSymbolsPS" },
{ "Root.PSFont.STIXGen", "/STIXGeneral" },
{ "Root.PSFont.STIXGenIt", "/STIXGeneral-Italic" },
{ "Root.PSFont.STIXGenBd", "/STIXGeneral-Bold" },
+diff --git a/graf3d/eve/src/TEveCaloLegoGL.cxx b/graf3d/eve/src/TEveCaloLegoGL.cxx
+index 786b03b64e0..2e9d8e6dc76 100644
+--- a/graf3d/eve/src/TEveCaloLegoGL.cxx
++++ b/graf3d/eve/src/TEveCaloLegoGL.cxx
+@@ -1065,7 +1065,7 @@ void TEveCaloLegoGL::DrawCells2D(TGLRnrCtx &rnrCtx, vCell2D_t& cells2D) const
+ {
+ TGLUtil::Color(rnrCtx.ColorSet().Markup().GetColorIndex());
+ TGLFont font;
+- rnrCtx.RegisterFontNoScale(fM->fCellPixelFontSize, "arial", TGLFont::kPixmap, font);
++ rnrCtx.RegisterFontNoScale(fM->fCellPixelFontSize, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, font);
+ const char* txt;
+ for (vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i) {
+
+diff --git a/graf3d/eve/src/TEveCaloLegoOverlay.cxx b/graf3d/eve/src/TEveCaloLegoOverlay.cxx
+index 8bf74af74a5..c8b89164c47 100644
+--- a/graf3d/eve/src/TEveCaloLegoOverlay.cxx
++++ b/graf3d/eve/src/TEveCaloLegoOverlay.cxx
+@@ -245,7 +245,7 @@ void TEveCaloLegoOverlay::RenderHeader(TGLRnrCtx& rnrCtx)
+
+ TGLFont font;
+ Int_t fs = TMath::Max(TMath::Nint(vp.Height()*0.035), 12);
+- rnrCtx.RegisterFontNoScale(fs, "arial", TGLFont::kPixmap, font);
++ rnrCtx.RegisterFontNoScale(fs, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, font);
+ font.PreRender();
+ Float_t off = fs*0.2;
+ Float_t bb[6];
+@@ -445,10 +445,10 @@ void TEveCaloLegoOverlay::RenderLogaritmicScales(TGLRnrCtx& rnrCtx)
+ // draw numbers
+ TGLFont fontB;
+ Int_t fsb = TMath::Max(TMath::Nint(vp.Height()*0.03), 12);
+- rnrCtx.RegisterFontNoScale(fsb, "arial", TGLFont::kPixmap, fontB);
++ rnrCtx.RegisterFontNoScale(fsb, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, fontB);
+ TGLFont fontE;
+ Int_t fsE = TMath::Max(TMath::Nint(vp.Height()*0.01), 8);
+- rnrCtx.RegisterFontNoScale(fsE, "arial", TGLFont::kPixmap, fontE);
++ rnrCtx.RegisterFontNoScale(fsE, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, fontE);
+
+ Float_t llx, lly, llz, urx, ury, urz;
+ fontB.BBox("10", llx, lly, llz, urx, ury, urz);
+@@ -554,7 +554,7 @@ void TEveCaloLegoOverlay::RenderPaletteScales(TGLRnrCtx& rnrCtx)
+ TGLUtil::Color(rnrCtx.ColorSet().Markup().GetColorIndex());
+ fAxisPainter->RefDir().Set(0, 1, 0);
+ Int_t fs = TMath::CeilNint(rnrCtx.GetCamera()->RefViewport().Height()*0.02);
+- fAxisPainter->SetLabelFont(rnrCtx, "arial", fs);
++ fAxisPainter->SetLabelFont(rnrCtx, TGLFontManager::GetFontNameFromId(40), fs);
+ fAxisPainter->SetTextFormat(0, maxVal, bw);
+ fAxisPainter->SetLabelAlign(TGLFont::kCenterH, TGLFont::kCenterV);
+ TAttAxis att;
diff --git a/graf3d/gl/CMakeLists.txt b/graf3d/gl/CMakeLists.txt
index a874da9e1d6..54544696063 100644
--- a/graf3d/gl/CMakeLists.txt
@@ -766,8 +844,64 @@ index a874da9e1d6..54544696063 100644
DEPENDENCIES
Hist
Gui
+diff --git a/graf3d/gl/inc/TGLFontManager.h b/graf3d/gl/inc/TGLFontManager.h
+index 86fc1edc834..ef3e71cb794 100644
+--- a/graf3d/gl/inc/TGLFontManager.h
++++ b/graf3d/gl/inc/TGLFontManager.h
+@@ -137,8 +137,6 @@ protected:
+ FontList_t fFontTrash; // fonts to purge
+
+ static TObjArray fgFontFileArray; // map font-id to ttf-font-file
+- // Default fonts - for gl/eve, "extended" - for gl-pad
+- static Int_t fgExtendedFontStart;
+
+ static FontSizeVec_t fgFontSizeArray; // map of valid font-size
+ static Bool_t fgStaticInitDone; // global initialization flag
+@@ -155,7 +153,6 @@ public:
+ static TObjArray* GetFontFileArray();
+ static FontSizeVec_t* GetFontSizeArray();
+
+- static Int_t GetExtendedFontStartIndex();
+ static Int_t GetFontSize(Int_t ds);
+ static Int_t GetFontSize(Int_t ds, Int_t min, Int_t max);
+ static const char* GetFontNameFromId(Int_t);
+diff --git a/graf3d/gl/src/TGLAnnotation.cxx b/graf3d/gl/src/TGLAnnotation.cxx
+index 96ab113e827..22deb6dcbd5 100644
+--- a/graf3d/gl/src/TGLAnnotation.cxx
++++ b/graf3d/gl/src/TGLAnnotation.cxx
+@@ -271,7 +271,7 @@ void TGLAnnotation::Render(TGLRnrCtx& rnrCtx)
+ {
+ // get unscaled text size
+ Int_t fs = TGLFontManager::GetFontSize(TMath::Nint(vp.Height()*fTextSize), 12, 64);
+- rnrCtx.RegisterFontNoScale(fs, "arial", TGLFont::kTexture, fFont);
++ rnrCtx.RegisterFontNoScale(fs, TGLFontManager::GetFontNameFromId(40), TGLFont::kTexture, fFont);
+ descent = fFont.GetDescent();
+ line_height = fFont.GetLineHeight();
+
+diff --git a/graf3d/gl/src/TGLCameraOverlay.cxx b/graf3d/gl/src/TGLCameraOverlay.cxx
+index 2da30224ebc..7c4bbbbe26c 100644
+--- a/graf3d/gl/src/TGLCameraOverlay.cxx
++++ b/graf3d/gl/src/TGLCameraOverlay.cxx
+@@ -131,7 +131,7 @@ void TGLCameraOverlay::RenderPlaneIntersect(TGLRnrCtx& rnrCtx)
+ TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
+ TGLFont font;
+ Int_t fs = TMath::Nint(TMath::Sqrt(vp.Width()*vp.Width() + vp.Height()*vp.Height())*0.02);
+- rnrCtx.RegisterFontNoScale(fs, "arial", TGLFont::kPixmap, font);
++ rnrCtx.RegisterFontNoScale(fs, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, font);
+ const char* txt = Form("(%f, %f, %f)", v[0], v[1], v[2]);
+ TGLUtil::Color(rnrCtx.ColorSet().Markup());
+ font.Render(txt, 0.98, 0.98, 0, TGLFont::kRight, TGLFont::kBottom);
+@@ -405,7 +405,7 @@ void TGLCameraOverlay::RenderBar(TGLRnrCtx& rnrCtx)
+ const char* txt = Form("%.*f", (exp < 0) ? -exp : 0, red);
+ Float_t bb[6];
+ TGLFont font;
+- rnrCtx.RegisterFont(12, "arial", TGLFont::kPixmap, font);
++ rnrCtx.RegisterFont(12, TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, font);
+ font.BBox(txt, bb[0], bb[1], bb[2], bb[3], bb[4], bb[5]);
+ TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
+ Double_t mH = (fFrustum[3]-fFrustum[1])*bb[4]/vp.Height();
diff --git a/graf3d/gl/src/TGLFontManager.cxx b/graf3d/gl/src/TGLFontManager.cxx
-index 776e9d286f8..c4134c5980c 100644
+index 776e9d286f8..fe7e881fa85 100644
--- a/graf3d/gl/src/TGLFontManager.cxx
+++ b/graf3d/gl/src/TGLFontManager.cxx
@@ -36,6 +36,7 @@
@@ -778,7 +912,15 @@ index 776e9d286f8..c4134c5980c 100644
/** \class TGLFont
\ingroup opengl
-@@ -450,16 +451,120 @@ void TGLFontManager::RegisterFont(Int_t sizeIn, Int_t fileID, TGLFont::EMode mod
+@@ -419,7 +420,6 @@ This enables FTGL fonts to be shared same way as textures and display lists.
+ ClassImp(TGLFontManager);
+
+ TObjArray TGLFontManager::fgFontFileArray;
+-Int_t TGLFontManager::fgExtendedFontStart;
+ TGLFontManager::FontSizeVec_t TGLFontManager::fgFontSizeArray;
+ Bool_t TGLFontManager::fgStaticInitDone = kFALSE;
+
+@@ -450,16 +450,22 @@ void TGLFontManager::RegisterFont(Int_t sizeIn, Int_t fileID, TGLFont::EMode mod
FontMap_i it = fFontMap.find(TGLFont(size, fileID, mode));
if (it == fFontMap.end())
{
@@ -791,112 +933,15 @@ index 776e9d286f8..c4134c5980c 100644
- ((TObjString*)fgFontFileArray[fileID])->String());
- file = fp;
- delete [] fp;
+- }
+ TString file;
+
-+ TString fontname = fileID < fgExtendedFontStart ?
-+ ((TObjString*)fgFontFileArray[fileID])->String() + ".ttf" :
-+ ((TObjString*)fgFontFileArray[fileID])->String();
++ TString fontname = ((TObjString*)fgFontFileArray[fileID])->String();
+
-+ FcPattern *pat = nullptr, *match;
++ FcPattern *pat, *match;
+ FcResult result;
+
-+ if (strcmp(fontname, "timesi.ttf") == 0 ||
-+ strcmp(fontname, "FreeSerifItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:italic");
-+ }
-+ else if (strcmp(fontname, "timesbd.ttf") == 0 ||
-+ strcmp(fontname, "FreeSerifBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold");
-+ }
-+ else if (strcmp(fontname, "timesbi.ttf") == 0 ||
-+ strcmp(fontname, "FreeSerifBoldItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif:bold:italic");
-+ }
-+ else if (strcmp(fontname, "arial.ttf") == 0 ||
-+ strcmp(fontname, "FreeSans.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans");
-+ }
-+ else if (strcmp(fontname, "ariali.ttf") == 0 ||
-+ strcmp(fontname, "FreeSansOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:italic");
-+ }
-+ else if (strcmp(fontname, "arialbd.ttf") == 0 ||
-+ strcmp(fontname, "FreeSansBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold");
-+ }
-+ else if (strcmp(fontname, "arialbi.ttf") == 0 ||
-+ strcmp(fontname, "FreeSansBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freesans:bold:italic");
-+ }
-+ else if (strcmp(fontname, "cour.ttf") == 0 ||
-+ strcmp(fontname, "FreeMono.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono");
-+ }
-+ else if (strcmp(fontname, "couri.ttf") == 0 ||
-+ strcmp(fontname, "FreeMonoOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:italic");
-+ }
-+ else if (strcmp(fontname, "courbd.ttf") == 0 ||
-+ strcmp(fontname, "FreeMonoBold.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold");
-+ }
-+ else if (strcmp(fontname, "courbi.ttf") == 0 ||
-+ strcmp(fontname, "FreeMonoBoldOblique.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freemono:bold:italic");
-+ }
-+ else if (strcmp(fontname, "symbol.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "standardsymbolsps");
-+ }
-+ else if (strcmp(fontname, "times.ttf") == 0 ||
-+ strcmp(fontname, "FreeSerif.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "freeserif");
- }
-+ else if (strcmp(fontname, "wingding.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "dingbats");
-+ }
-+ else if (strcmp(fontname, "STIXGeneral.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixgeneral");
-+ }
-+ else if (strcmp(fontname, "STIXGeneralItalic.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixgeneral:italic");
-+ }
-+ else if (strcmp(fontname, "STIXGeneralBol.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixgeneral:bold");
-+ }
-+ else if (strcmp(fontname, "STIXGeneralBolIta.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixgeneral:bold:italic");
-+ }
-+ else if (strcmp(fontname, "STIXSiz1Sym.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize1");
-+ }
-+ else if (strcmp(fontname, "STIXSiz1SymBol.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize1:bold");
-+ }
-+ else if (strcmp(fontname, "STIXSiz2Sym.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize2");
-+ }
-+ else if (strcmp(fontname, "STIXSiz2SymBol.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize2:bold");
-+ }
-+ else if (strcmp(fontname, "STIXSiz3Sym.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize3");
-+ }
-+ else if (strcmp(fontname, "STIXSiz3SymBol.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize3:bold");
-+ }
-+ else if (strcmp(fontname, "STIXSiz4Sym.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize4");
-+ }
-+ else if (strcmp(fontname, "STIXSiz4SymBol.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize4:bold");
-+ }
-+ else if (strcmp(fontname, "STIXSiz5Sym.otf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "stixsize5");
-+ }
-+ else if (strcmp(fontname, "DroidSansFallback.ttf") == 0) {
-+ pat = FcNameParse ((const FcChar8*) "droidsansfallback:charset=4e00 0410");
-+ }
-+
++ pat = FcNameParse ((const FcChar8*) fontname.Data());
+ FcConfigSubstitute (nullptr, pat, FcMatchPattern);
+ FcDefaultSubstitute (pat);
+ match = FcFontMatch (nullptr, pat, &result);
@@ -908,8 +953,177 @@ index 776e9d286f8..c4134c5980c 100644
FTFont* ftfont = 0;
switch (mode)
+@@ -564,17 +570,6 @@ TGLFontManager::FontSizeVec_t* TGLFontManager::GetFontSizeArray()
+ return &fgFontSizeArray;
+ }
+
+-////////////////////////////////////////////////////////////////////////////////
+-
+-Int_t TGLFontManager::GetExtendedFontStartIndex()
+-{
+- if (fgStaticInitDone == kFALSE) InitStatics();
+-
+- assert(fgExtendedFontStart > 0 && "GetExtendedFontStartIndex, invalid index");
+-
+- return fgExtendedFontStart;
+-}
+-
+ ////////////////////////////////////////////////////////////////////////////////
+ /// Get availabe font size.
+
+@@ -608,8 +603,8 @@ const char* TGLFontManager::GetFontNameFromId(Int_t id)
+
+ Int_t fontIndex = id / 10;
+
+- if (fontIndex > fgFontFileArray.GetEntries() || !fontIndex)
+- fontIndex = 5;//arialbd
++ if (fontIndex > fgFontFileArray.GetEntries() || fontIndex < 1)
++ fontIndex = 5; // nimbussans:bold
+ else
+ fontIndex -= 1;
+
+@@ -622,66 +617,44 @@ const char* TGLFontManager::GetFontNameFromId(Int_t id)
+
+ void TGLFontManager::InitStatics()
+ {
+- fgFontFileArray.Add(new TObjString("timesi")); // 10
+- fgFontFileArray.Add(new TObjString("timesbd")); // 20
+- fgFontFileArray.Add(new TObjString("timesbi")); // 30
+-
+- fgFontFileArray.Add(new TObjString("arial")); // 40
+- fgFontFileArray.Add(new TObjString("ariali")); // 50
+- fgFontFileArray.Add(new TObjString("arialbd")); // 60
+- fgFontFileArray.Add(new TObjString("arialbi")); // 70
+-
+- fgFontFileArray.Add(new TObjString("cour")); // 80
+- fgFontFileArray.Add(new TObjString("couri")); // 90
+- fgFontFileArray.Add(new TObjString("courbd")); // 100
+- fgFontFileArray.Add(new TObjString("courbi")); // 110
+-
+- fgFontFileArray.Add(new TObjString("symbol")); // 120
+- fgFontFileArray.Add(new TObjString("times")); // 130
+- fgFontFileArray.Add(new TObjString("wingding")); // 140
+- fgFontFileArray.Add(new TObjString("symbol")); // 150
+-
+- fgExtendedFontStart = fgFontFileArray.GetEntries();
+- //"Extended" fonts for gl-pad.
+- //fgPadFontStart + ...
+- fgFontFileArray.Add(new TObjString("FreeSerifItalic.otf")); // 10 (160)
+- fgFontFileArray.Add(new TObjString("FreeSerifBold.otf")); // 20 (170)
+- fgFontFileArray.Add(new TObjString("FreeSerifBoldItalic.otf")); // 30
+-
+- fgFontFileArray.Add(new TObjString("FreeSans.otf")); // 40
+- fgFontFileArray.Add(new TObjString("FreeSansOblique.otf")); // 50
+- fgFontFileArray.Add(new TObjString("FreeSansBold.otf")); // 60
+- fgFontFileArray.Add(new TObjString("FreeSansBoldOblique.otf")); // 70
+-
+- fgFontFileArray.Add(new TObjString("FreeMono.otf")); // 80
+- fgFontFileArray.Add(new TObjString("FreeMonoOblique.otf")); // 90
+- fgFontFileArray.Add(new TObjString("FreeMonoBold.otf")); // 100
+- fgFontFileArray.Add(new TObjString("FreeMonoBoldOblique.otf")); // 110
+-
+- fgFontFileArray.Add(new TObjString("symbol.ttf")); // 120
+- fgFontFileArray.Add(new TObjString("FreeSerif.otf")); // 130
+- fgFontFileArray.Add(new TObjString("wingding.ttf")); // 140
+- fgFontFileArray.Add(new TObjString("symbol.ttf")); // 150
+-
+- fgFontFileArray.Add(new TObjString("STIXGeneral.otf")); // 200
+- fgFontFileArray.Add(new TObjString("STIXGeneralItalic.otf")); // 210
+- fgFontFileArray.Add(new TObjString("STIXGeneralBol.otf")); // 220
+- fgFontFileArray.Add(new TObjString("STIXGeneralBolIta.otf")); // 230
+-
+- fgFontFileArray.Add(new TObjString("STIXSiz1Sym.otf")); // 240
+- fgFontFileArray.Add(new TObjString("STIXSiz1SymBol.otf")); // 250
+- fgFontFileArray.Add(new TObjString("STIXSiz2Sym.otf")); // 260
+- fgFontFileArray.Add(new TObjString("STIXSiz2SymBol.otf")); // 270
+-
+- fgFontFileArray.Add(new TObjString("STIXSiz3Sym.otf")); // 280
+- fgFontFileArray.Add(new TObjString("STIXSiz3SymBol.otf")); // 290
+- fgFontFileArray.Add(new TObjString("STIXSiz4Sym.otf")); // 300
+- fgFontFileArray.Add(new TObjString("STIXSiz4SymBol.otf")); // 310
+-
+- fgFontFileArray.Add(new TObjString("STIXSiz5Sym.otf")); // 320
+- fgFontFileArray.Add(new TObjString("DroidSansFallback.ttf")); // 330
+- fgFontFileArray.Add(new TObjString("DroidSansFallback.ttf")); // 340
+- fgFontFileArray.Add(new TObjString("DroidSansFallback.ttf")); // 350
++ fgFontFileArray.Add(new TObjString("nimbusroman:italic")); // 10
++ fgFontFileArray.Add(new TObjString("nimbusroman:bold")); // 20
++ fgFontFileArray.Add(new TObjString("nimbusroman:bold:italic")); // 30
++
++ fgFontFileArray.Add(new TObjString("nimbussans")); // 40
++ fgFontFileArray.Add(new TObjString("nimbussans:italic")); // 50
++ fgFontFileArray.Add(new TObjString("nimbussans:bold")); // 60
++ fgFontFileArray.Add(new TObjString("nimbussans:bold:italic")); // 70
++
++ fgFontFileArray.Add(new TObjString("nimbusmonops")); // 80
++ fgFontFileArray.Add(new TObjString("nimbusmonops:italic")); // 90
++ fgFontFileArray.Add(new TObjString("nimbusmonops:bold")); // 100
++ fgFontFileArray.Add(new TObjString("nimbusmonops:bold:italic")); // 110
++
++ fgFontFileArray.Add(new TObjString("standardsymbolsps")); // 120
++ fgFontFileArray.Add(new TObjString("nimbusroman")); // 130
++ fgFontFileArray.Add(new TObjString("d050000l")); // 140
++ fgFontFileArray.Add(new TObjString("standardsymbolsps")); // 150
++
++ fgFontFileArray.Add(new TObjString("stixgeneral")); // 160
++ fgFontFileArray.Add(new TObjString("tixgeneral:italic")); // 170
++ fgFontFileArray.Add(new TObjString("stixgeneral:bold")); // 180
++ fgFontFileArray.Add(new TObjString("stixgeneral:bold:italic")); // 190
++
++ fgFontFileArray.Add(new TObjString("stixsize1")); // 200
++ fgFontFileArray.Add(new TObjString("stixsize1:bold")); // 210
++ fgFontFileArray.Add(new TObjString("stixsize2")); // 220
++ fgFontFileArray.Add(new TObjString("stixsize2:bold")); // 230
++
++ fgFontFileArray.Add(new TObjString("stixsize3")); // 240
++ fgFontFileArray.Add(new TObjString("stixsize3:bold")); // 250
++ fgFontFileArray.Add(new TObjString("stixsize4")); // 260
++ fgFontFileArray.Add(new TObjString("stixsize4:bold")); // 270
++
++ fgFontFileArray.Add(new TObjString("stixsize5")); // 280
++ fgFontFileArray.Add(new TObjString("droidsansfallback:charset=4e00 AC00")); // 290
++ fgFontFileArray.Add(new TObjString("droidsansfallback:charset=4e00 AC00")); // 300
++ fgFontFileArray.Add(new TObjString("droidsansfallback:charset=4e00 AC00")); // 310
+
+ for (Int_t i = 10; i <= 20; i+=2)
+ fgFontSizeArray.push_back(i);
+diff --git a/graf3d/gl/src/TGLOverlayButton.cxx b/graf3d/gl/src/TGLOverlayButton.cxx
+index 9794303215a..1bb3b95b77b 100644
+--- a/graf3d/gl/src/TGLOverlayButton.cxx
++++ b/graf3d/gl/src/TGLOverlayButton.cxx
+@@ -112,7 +112,7 @@ void TGLOverlayButton::Render(TGLRnrCtx& rnrCtx)
+
+ // Text rendering
+ {
+- rnrCtx.RegisterFontNoScale(TMath::Nint(fHeight*0.8), "arial", TGLFont::kPixmap, fFont);
++ rnrCtx.RegisterFontNoScale(TMath::Nint(fHeight*0.8), TGLFontManager::GetFontNameFromId(40), TGLFont::kPixmap, fFont);
+ fFont.PreRender(kFALSE);
+
+ TColor::Pixel2RGB(fTextColor, r, g, b);
+diff --git a/graf3d/gl/src/TGLPadPainter.cxx b/graf3d/gl/src/TGLPadPainter.cxx
+index 0fbeccbfcbc..8f65a9de2a7 100644
+--- a/graf3d/gl/src/TGLPadPainter.cxx
++++ b/graf3d/gl/src/TGLPadPainter.cxx
+@@ -822,16 +822,7 @@ void TGLPadPainter::DrawTextHelper(Double_t x, Double_t y, const Char *text, ETe
+ Rgl::Pad::ExtractRGBA(gVirtualX->GetTextColor(), rgba);
+ glColor4fv(rgba);
+
+- //10 is the first valid font index.
+- //20 is FreeSerifBold, as in TTF.cxx and in TGLFontManager.cxx.
+- //shift - is the shift to access "extended" fonts.
+- const Int_t shift = TGLFontManager::GetExtendedFontStartIndex();
+-
+- Int_t fontIndex = TMath::Max(Short_t(10), gVirtualX->GetTextFont());
+- if (fontIndex / 10 + shift > TGLFontManager::GetFontFileArray()->GetEntries())
+- fontIndex = 20 + shift * 10;
+- else
+- fontIndex += shift * 10;
++ Int_t fontIndex = gVirtualX->GetTextFont();
+
+ fFM.RegisterFont(TMath::Max(Int_t(gVirtualX->GetTextSize()) - 1, 10),//kTexture does not work if size < 10.
+ TGLFontManager::GetFontNameFromId(fontIndex),
diff --git a/graf3d/gl/src/TGLText.cxx b/graf3d/gl/src/TGLText.cxx
-index f84f5193d2f..8a672c787c0 100644
+index f84f5193d2f..099d162f008 100644
--- a/graf3d/gl/src/TGLText.cxx
+++ b/graf3d/gl/src/TGLText.cxx
@@ -32,6 +32,8 @@
@@ -947,21 +1161,21 @@ index f84f5193d2f..8a672c787c0 100644
- TROOT::GetTTFFontDir());
- char *ttfont = gSystem->Which(ttpath, fontname, kReadPermission);
+ static const char *fonttable[] = {
-+ "freesans:bold",
-+ "freeserif:italic",
-+ "freeserif:bold",
-+ "freeserif:bold:italic",
-+ "freesans",
-+ "freesans:italic",
-+ "freesans:bold",
-+ "freesans:bold:italic",
-+ "freemono",
-+ "freemono:italic",
-+ "freemono:bold",
-+ "freemono:bold:italic",
++ "nimbussans:bold",
++ "nimbusroman:italic",
++ "nimbusroman:bold",
++ "nimbusroman:bold:italic",
++ "nimbussans",
++ "nimbussans:italic",
++ "nimbussans:bold",
++ "nimbussans:bold:italic",
++ "nimbusmonops",
++ "nimbusmonops:italic",
++ "nimbusmonops:bold",
++ "nimbusmonops:bold:italic",
+ "standardsymbolsps",
-+ "freeserif",
-+ "dingbats",
++ "nimbusroman",
++ "d050000l",
+ };
+
+ char *ttfont;
@@ -1016,5 +1230,5 @@ index 72d7dbbf95f..73a44fdd7fd 100644
// Create the canvas colors early so they are allocated before
--
-2.53.0
+2.56.0
diff --git a/root-pdf-Fix-calculation-of-kerning-distances-in-generate.patch b/root-pdf-Fix-calculation-of-kerning-distances-in-generate.patch
new file mode 100644
index 0000000..598d7b0
--- /dev/null
+++ b/root-pdf-Fix-calculation-of-kerning-distances-in-generate.patch
@@ -0,0 +1,68 @@
+From 87e5571eef573a1ab802c9b5b68e4215045689b9 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Sat, 29 Aug 2026 13:15:53 +0200
+Subject: [PATCH] [pdf] Fix calculation of kerning distances in generated PDF
+ files
+
+Note that this uses the system fonts on Fedora rather than the bundled
+fonts in the root sources.
+
+Using the following test program
+
+void ttest()
+{
+ auto c = new TCanvas("c", "", 300, 100);
+ auto t = new TText(0.1, 0.4, "Raw assymmetry");
+ t->SetTextSize(0.5);
+ t->SetTextFont(132);
+ t->Draw();
+ c->Print("ttest.pdf");
+ c->Print("ttest.eps");
+ c->Print("ttest.png");
+}
+
+The .eps and .png images look like expected. But the .pdf image only
+shows the initial capital "R", not the full "Raw assymmetry" text.
+
+After decompressing the generated .pdf file:
+
+cpdf -decompress ttest.pdf -o ttest.dec.pdf
+
+the decompressed file shows that the kerning distances are incorrect:
+
+[(R) -2147483648(a) 24(w) -2147483648( ) 0(a) 0(s) -2147483648(s) 17(y) 0(m) 0(m) 8(e) 8(t) 0(r) -2147483648(y) ]
+
+Something has clearly gone wrong here. -2147483648 is the minimum
+value that can be stored in a 16 bit signed integer.
+
+The origin of the problem is a calculation of a difference between a
+UInt_t (i.e. unsigned) value and an Int_t (i.e. signed) value in the
+TPDF::Text() method. Casting the UInt_t to an Int_t before calculating
+the difference, as done in this commit, fixes the problem. With this
+change the kerning distances are better:
+
+[(R) -2(a) 24(w) -2( ) 0(a) 0(s) -2(s) 17(y) 0(m) 0(m) 8(e) 8(t) 0(r) -2(y) ]
+
+and the generated .pdf file shows the complete text. The generated
+.png and .eps files do not change (except for the time stamp in the
+.eps file).
+---
+ graf2d/postscript/src/TPDF.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/graf2d/postscript/src/TPDF.cxx b/graf2d/postscript/src/TPDF.cxx
+index 21a2506010f..e1cd9b10d10 100644
+--- a/graf2d/postscript/src/TPDF.cxx
++++ b/graf2d/postscript/src/TPDF.cxx
+@@ -1943,7 +1943,7 @@ void TPDF::Text(Double_t xx, Double_t yy, const char *chars)
+ tmp[0] = chars[i-1];
+ UInt_t width=0;
+ t.GetTextAdvance(width, &tmp[0], kFALSE);
+- Double_t wwl = gPad->AbsPixeltoX(width - charDeltas[i]) - gPad->AbsPixeltoX(0);
++ Double_t wwl = gPad->AbsPixeltoX((Int_t)width - charDeltas[i]) - gPad->AbsPixeltoX(0);
+ wwl -= 0.5*(gPad->AbsPixeltoX(1) - gPad->AbsPixeltoX(0)); // half a pixel ~ rounding error
+ charDeltas[i] = (Int_t)((1000.0/Float_t(fontsize))*(XtoPDF(wwl) - XtoPDF(0))/scale);
+ }
+--
+2.55.0
+
diff --git a/root.spec b/root.spec
index 1ca783e..43793ab 100644
--- a/root.spec
+++ b/root.spec
@@ -57,7 +57,7 @@
Name: root
Version: 6.30.12
%global libversion %(cut -d. -f 1-2 <<< %{version})
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Numerical data analysis framework
License: LGPL-2.1-or-later
@@ -145,6 +145,13 @@ Patch25: %{name}-Whitelist-libtbbmalloc-in-library-import-test.patch
# Update ROOT's R interface for Rcpp 1.0.13
# https://github.com/root-project/root/pull/16075
Patch26: %{name}-r.patch
+# Use the normal text fonts for cyrillic in TMathText
+Patch27: %{name}-Use-the-normal-text-font-for-cyrillic.patch
+# Adjust stressGraphics reference
+Patch28: %{name}-Adjust-stressGraphics-reference.patch
+# Fix calculation of kerning distances in generated PDF files
+# https://github.com/root-project/root/pull/23188
+Patch29: %{name}-pdf-Fix-calculation-of-kerning-distances-in-generate.patch
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
@@ -251,9 +258,9 @@ BuildRequires: perl-generators
BuildRequires: gtest-devel
BuildRequires: gmock-devel
# Fonts
-BuildRequires: font(freesans)
-BuildRequires: font(freeserif)
-BuildRequires: font(freemono)
+BuildRequires: font(nimbussans)
+BuildRequires: font(nimbusroman)
+BuildRequires: font(nimbusmonops)
BuildRequires: font(standardsymbolsps)
BuildRequires: font(d050000l)
BuildRequires: font(z003)
@@ -368,9 +375,9 @@ Requires: json-devel >= 3.9
%endif
# Fonts
Requires: xorg-x11-fonts-ISO8859-1-75dpi
-Requires: font(freesans)
-Requires: font(freeserif)
-Requires: font(freemono)
+Requires: font(nimbussans)
+Requires: font(nimbusroman)
+Requires: font(nimbusmonops)
Requires: font(standardsymbolsps)
Requires: font(d050000l)
Requires: font(z003)
@@ -2066,6 +2073,9 @@ This package contains utility functions for ntuples.
%patch -P24 -p1
%patch -P25 -p1
%patch -P26 -p1
+%patch -P27 -p1
+%patch -P28 -p1
+%patch -P29 -p1
# Remove bundled sources in order to be sure they are not used
# * afterimage
@@ -3811,6 +3821,12 @@ fi
%endif
%changelog
+* Fri Oct 16 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.30.12-2
+- Rebuild for pythia8 8.3.18
+- Use the URW fonts (Nimbus Roman/Sans/Mono) for text for consistency
+- Use the normal text fonts for cyrillic in TMathText
+- Fix calculation of kerning distances in generated PDF files
+
* Mon Jun 29 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.30.12-1
- Update to 6.30.12
reply other threads:[~2026-10-16 9:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179214132328.1.17718060863051575826.rpms-root-80dd7def7cfb@fedoraproject.org \
--to=mattias.ellert@physics.uu.se \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox