11-21-2018, 07:48 AM | #1 |
Chalut o/
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
|
Hexadecimal support for calibre-debug --subset-font ?
Code:
calibre-debug --subset-font FontFile.otf FontFile-subset.otf --unicode 22A0-304F It is more common to designate the point code of a Unicode character in Hexa format (because make a manuel conversion Hexa to Decimal... not cool) Thanks Last edited by un_pogaz; 11-21-2018 at 08:59 AM. |
11-21-2018, 09:03 AM | #2 |
creator of calibre
Posts: 43,851
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you can do that already by using either U+ or 0x prefixes to the numbers.
|
11-21-2018, 09:28 AM | #3 |
Chalut o/
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
|
Euh, sure
calibre-debug -f "FontFile.otf" "FontFile-subset.otf" -c U+2220-U+222F Code:
Python function terminated unexpectedly invalid syntax (<string>, line 1) (Error Code: 1) Traceback (most recent call last): File "site.py", line 101, in main File "site.py", line 78, in run_entry_point File "site-packages\calibre\debug.py", line 276, in main File "<string>", line 1 U+2220-U+222F ^ SyntaxError: invalid syntax Last edited by un_pogaz; 11-21-2018 at 09:46 AM. |
11-22-2018, 12:47 AM | #4 |
Bibliophagist
Posts: 35,377
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The 0x syntax doesn't give an error but it also doesn't generate a subsetted font.
Edit: tried the following: Code:
C:\Transact>calibre-debug --subset-font code2000.ttf code2k_subset.ttf -c 65-90 C:\Transact> Last edited by DNSB; 11-22-2018 at 01:32 AM. |
11-22-2018, 06:16 AM | #5 |
Chalut o/
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
|
The purpose of this post is precisely to not have use the decimal format (for the reasons above).
Currently, it is necessary to use a script/soft to convert from Hexa to Decimal format. Not impossible, but not the most practical. |
11-22-2018, 10:50 AM | #6 |
Bibliophagist
Posts: 35,377
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
My posts were pointing out that selecting codes using either the 0x hex format or decimal also fails though unlike the U+ format, there is no error message. Trying to use the --codes variant fails as well.
|
11-22-2018, 11:38 AM | #7 |
creator of calibre
Posts: 43,851
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need a --
something like Code:
calibre-debug --subset-font -- --codes file.ttf out.ttf U+0067,U+0068 |
11-22-2018, 01:46 PM | #8 |
Chalut o/
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
|
Okay, it's work
Thank But I would like to say that, beyond the fact that this feature is not documented, this syntax is inchoereal with the reste. This reduces that practicality. |
11-22-2018, 09:07 PM | #9 |
creator of calibre
Posts: 43,851
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
this feature is not designed for end user use, it's part of calibre-debug and is provided to ease development/debugging of problems with the font subsetter.
|
11-23-2018, 03:00 AM | #10 |
Bibliophagist
Posts: 35,377
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FontShrinker - tool to subset a font | Toxaris | Workshop | 91 | 02-08-2018 06:54 PM |
Ctrl-Shft-R Debug vs calibre-debug -g | JimmXinu | Development | 3 | 11-20-2014 09:57 AM |
Embedded font-subset sometimes fails | GrannyGrump | Sigil | 3 | 10-20-2012 09:47 AM |
Development Dingo 1.11 secretly added DEBUG support! | kveroneau | enTourage Archive | 3 | 01-18-2011 02:57 AM |