|
|
#1 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 678910
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 09:59 AM. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you can do that already by using either U+ or 0x prefixes to the numbers.
|
|
|
|
|
|
#3 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 678910
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 10:46 AM. |
|
|
|
|
|
#4 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,163
Karma: 174315444
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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 02:32 AM. |
|
|
|
|
|
#5 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 678910
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. |
|
|
|
|
|
#6 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,163
Karma: 174315444
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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.
|
|
|
|
|
|
#7 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
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 |
|
|
|
|
|
#8 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 678910
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. |
|
|
|
|
|
#9 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
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.
|
|
|
|
|
|
#10 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,163
Karma: 174315444
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FontShrinker - tool to subset a font | Toxaris | Workshop | 91 | 02-08-2018 07:54 PM |
| Ctrl-Shft-R Debug vs calibre-debug -g | JimmXinu | Development | 3 | 11-20-2014 10:57 AM |
| Embedded font-subset sometimes fails | GrannyGrump | Sigil | 3 | 10-20-2012 10:47 AM |
| Development Dingo 1.11 secretly added DEBUG support! | kveroneau | enTourage Archive | 3 | 01-18-2011 03:57 AM |