diff --git a/imgsrc/calibreSymbols.spd b/imgsrc/calibreSymbols.spd index 391d95e509..28dac70d03 100644 --- a/imgsrc/calibreSymbols.spd +++ b/imgsrc/calibreSymbols.spd @@ -1,4 +1,4 @@ -SplineFontDB: 3.0 +SplineFontDB: 3.2 FontName: calibreSymbols FullName: calibre Symbols FamilyName: calibre Symbols @@ -22,7 +22,7 @@ OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 1 CreationTime: 1330331997 -ModificationTime: 1472969125 +ModificationTime: 1589697584 OS2TypoAscent: 0 OS2TypoAOffset: 1 OS2TypoDescent: 0 @@ -41,14 +41,14 @@ DEI: 91125 Encoding: UnicodeFull UnicodeInterp: none NameList: Adobe Glyph List -DisplaySize: -24 +DisplaySize: -72 AntiAlias: 1 FitToEm: 1 WidthSeparation: 150 -WinInfo: 0 152 34 +WinInfo: 11152 34 12 BeginPrivate: 0 EndPrivate -BeginChars: 1114112 4 +BeginChars: 1114112 5 StartChar: uni2605 Encoding: 9733 9733 0 @@ -177,6 +177,36 @@ SplineSet 452.702 647.221 458.162 649.834 466.134 649.834 c 4 474.454 649.834 466.134 74.71 466.134 74.71 c 1 EndSplineSet +Validated: 33 +EndChar + +StartChar: uni2BE8 +Encoding: 11240 11240 4 +Width: 979 +VWidth: -26 +Flags: W +LayerCount: 2 +Fore +SplineSet +466.134 74.71 m 1 + 320.554 -51.8184 l 2 + 274.802 -91.5547 249.758 -112.902 245.426 -115.866 c 0 + 241.092 -118.828 236.846 -120.31 232.688 -120.31 c 0 + 227.835 -120.31 223.415 -118.306 219.429 -114.297 c 0 + 215.442 -110.289 213.449 -105.844 213.449 -100.965 c 0 + 213.449 -97.8281 223.329 -71.3379 243.087 -21.4932 c 2 + 322.115 180.323 l 1 + 152.618 289.598 l 2 + 104.783 320.271 79.2217 337.176 75.9297 340.313 c 0 + 72.6357 343.45 70.9893 347.981 70.9893 353.907 c 0 + 70.9893 369.243 79.8291 376.912 97.5059 376.912 c 0 + 98.8926 376.912 123.155 374.82 170.296 370.638 c 2 + 379.825 352.862 l 1 + 427.14 555.201 l 2 + 439.271 607.834 446.811 636.764 449.757 641.992 c 0 + 452.702 647.221 458.162 649.834 466.134 649.834 c 4 + 474.454 649.834 466.134 74.71 466.134 74.71 c 1 +EndSplineSet Validated: 524321 EndChar EndChars diff --git a/resources/fonts/calibreSymbols.otf b/resources/fonts/calibreSymbols.otf index 9cb688b783..945233e173 100644 Binary files a/resources/fonts/calibreSymbols.otf and b/resources/fonts/calibreSymbols.otf differ diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 158cc9108c..a5dca7dac9 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -432,7 +432,7 @@ def check_doi(doi): return None -def rating_to_stars(value, allow_half_stars=False, star='★', half='½'): +def rating_to_stars(value, allow_half_stars=False, star='★', half='⯨'): r = max(0, min(int(value or 0), 10)) ans = star * (r // 2) if allow_half_stars and r % 2: diff --git a/src/calibre/gui2/preferences/create_custom_column.py b/src/calibre/gui2/preferences/create_custom_column.py index 65417b28bc..6310568b67 100644 --- a/src/calibre/gui2/preferences/create_custom_column.py +++ b/src/calibre/gui2/preferences/create_custom_column.py @@ -361,7 +361,7 @@ class CreateCustomColumn(QDialog): # Rating allow half stars self.allow_half_stars = ahs = QCheckBox(_('Allow half stars')) - ahs.setToolTip(_('Allow half star ratings, for example: ') + '★★★½') + ahs.setToolTip(_('Allow half star ratings, for example: ') + '★★★⯨') add_row(None, ahs) # Composite display properties diff --git a/src/calibre/utils/fonts/utils.py b/src/calibre/utils/fonts/utils.py index fd5987614d..155298a362 100644 --- a/src/calibre/utils/fonts/utils.py +++ b/src/calibre/utils/fonts/utils.py @@ -463,7 +463,7 @@ def test_glyph_ids(): def test_supports_text(): data = P('fonts/calibreSymbols.otf', data=True) - if not supports_text(data, '.★½'): + if not supports_text(data, '.★½⯨'): raise RuntimeError('Incorrectly returning that text is not supported') if supports_text(data, 'abc'): raise RuntimeError('Incorrectly claiming that text is supported') diff --git a/src/pyj/test_utils.pyj b/src/pyj/test_utils.pyj index f424e1b06d..da2c6bbe1b 100644 --- a/src/pyj/test_utils.pyj +++ b/src/pyj/test_utils.pyj @@ -8,7 +8,7 @@ from utils import fmt_sidx, human_readable, rating_to_stars @test def misc_utils(): - assert_equal(rating_to_stars(3, True), '★½') + assert_equal(rating_to_stars(3, True), '★⯨') assert_equal(fmt_sidx(10), 'X') assert_equal(fmt_sidx(1.2), '1.20') assert_equal(list(map(human_readable, [1, 1024.0, 1025, 1024*1024*2.3])), ["1 B", "1 KB", "1 KB", "2.3 MB"]) diff --git a/src/pyj/utils.pyj b/src/pyj/utils.pyj index a431d94905..8e489d8832 100644 --- a/src/pyj/utils.pyj +++ b/src/pyj/utils.pyj @@ -121,7 +121,7 @@ def fmt_sidx(val, fmt='{:.2f}', use_roman=True): return int(val) + '' return fmt.format(float(val)) -def rating_to_stars(value, allow_half_stars=False, star='★', half='½'): +def rating_to_stars(value, allow_half_stars=False, star='★', half='⯨'): r = max(0, min(int(value or 0), 10)) if allow_half_stars: ans = star.repeat(r // 2)