Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-08-2018, 07:23 AM   #16
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by bravosx View Post
The plugin does not work. From 7 days there is a new version of fonttools 3.32.0 but there is no * whl file.
For some reason the developers didn't release a .whl file with fontTools 3.32.0. This might have been a mistake or they've decided to no longer release Python .whl files.

I'll keep an eye on the fontTools release pages and will update the fontTools update code if they no longer release .whl files.

(I've also embedded fonttools 3.32.0 in the latest plugin version.)
Doitsu is offline   Reply With Quote
Old 11-08-2018, 08:52 AM   #17
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
For some reason the developers didn't release a .whl file with fontTools 3.32.0. This might have been a mistake or they've decided to no longer release Python .whl files.

I'll keep an eye on the fontTools release pages and will update the fontTools update code if they no longer release .whl files.

(I've also embedded fonttools 3.32.0 in the latest plugin version.)
For what it's worth, I'm seeing a wheel file for fontTools 3.32.0 on PyPi.org. That's what pip would use when installing. But PyPi wouldn't be that easy to query for updates (or to get the download link). Not sure why they would stop publishing the .whl file on github. Perhaps they're relying on PyPi to create it for them from the source tarball they upload.

The wheel files are fairly trivial to build. Perhaps you could fork the fontTools repo and upload your own release wheels file to it. That way you could control the upgrade process of your plugin.
DiapDealer is offline   Reply With Quote
Advert
Old 11-08-2018, 09:25 AM   #18
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
For what it's worth, I'm seeing a wheel file for fontTools 3.32.0 on PyPi.org.
So far the plugin has checked Github for updates, because the PyPi.org version was often outdated. Also Github provides JSON files that are relatively easy to parse.

Quote:
Originally Posted by DiapDealer View Post
Perhaps you could fork the fontTools repo and upload your own release wheels file to it.
Since fontTools is a pure Python package and the source code zip file contains all the files that I need, creating my own fork would be a bit overkill.

If the developers stop posting .whl files on Github, I'll simply web scrape the fontTools PyPi.org page.

Last edited by Doitsu; 11-08-2018 at 09:29 AM.
Doitsu is offline   Reply With Quote
Old 11-08-2018, 09:32 AM   #19
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
If the developer stop posting .whl files on Github, I'll simply web scrape the fontTools PyPi.org page.
Probably easiest.

After a quick glance: they're definitely building a wheel as part of their Travis CI automation (which in turn is automatically creating the Github release), but they must have started cleaning it up after the automated upload to PyPi. *shrug*

The good news is that they look fully automated, now. Commits tagged for Release should automatically trigger both a new Github release and a new version uploaded to PyPi. So there should be very little (if any) lag between the Github and PyPi versions of fontTools from now on (the github release date and the pypi release date of 3.32.0 are indeed one and the same). That should make it easier on you. Good luck!

Last edited by DiapDealer; 11-08-2018 at 09:39 AM.
DiapDealer is offline   Reply With Quote
Old 11-08-2018, 11:50 AM   #20
bravosx
Connoisseur
bravosx began at the beginning.
 
Posts: 99
Karma: 10
Join Date: Jun 2014
Location: Poland, Żory
Device: Prestigio PER3464B, Onyx Lynx, Lenovo S5000 i Tab4-8"
@Doitsu
Thanks for fast reaction.

bravosx
bravosx is offline   Reply With Quote
Advert
Old 11-21-2018, 04:36 AM   #21
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 408
Karma: 145324
Join Date: Dec 2017
Device: Kobo
Holly crap
For as long as I've been looking for a tool of this kind: Thank you very much.


Hum, a practical feature would be to add the suffix "-subset" to the processed file.

Attached, a request for help not necessarily in that place, but sincere:
Spoiler:
I didn't know anything about Python (but full of good will, not hesitating to get your hands on code) could you create a script based on your plugin or fontTools?
(I'll install whatever it takes)

The goal is a script that works with this command line:
SubsetScrip.py -f "Font 1" "Font 2" ... -r 16A0-16FF 046A 04DC
{ -f -font : Source Fonts files / -r -range : Unicode range of the subsets }

This command line will process Font 1, 2 etc. and extract the Unicode range 16A0 to 16FF as well as the characters 046A and 04DC
(and preferably, do not overwrite the source files but copies)

This may not be the right place to ask for this, but my request is desperate and your providential help because has long since given up hope of finding software that would do this

Last edited by un_pogaz; 11-21-2018 at 07:56 AM.
un_pogaz is offline   Reply With Quote
Old 11-21-2018, 05:18 AM   #22
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by un_pogaz View Post
[...] could you create a script based on your plugin or fontTools?
The fontTools developers have already created a command line tool for font subsetting: pyftsubset.

To use it, you'll need to:

1. Install Python.
2. Install fontTools as an administrator using pip: pip install FontTools

The syntax is:

Code:
pyftsubset font-file --text=<text>
or

Code:
pyftsubset font-file --text-file=<path>
For more information on the available options enter:
Code:
pyftsubset --help
You also might want to check out the Calibre subsetting tool, which can also be used in batch files/shell scripts.
Doitsu is offline   Reply With Quote
Old 11-21-2018, 06:34 AM   #23
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 408
Karma: 145324
Join Date: Dec 2017
Device: Kobo
Calibre, of course, the solution to all your problems.

Thank you very much for your 2 solutions


Well, after testing, the subset of Caliber is much heavier than the subset of FontTool (160 Ko for Caliber versus 8 Ko for FontTool), I would look at the options in detail and the why of the how later but that would be out of subject here.

Here are the command line for those who are interested
Font: STIX Two Mat
Code range: 2220-222F (∠-∯)

Calibre
Code:
calibre-debug -f "STIX2Math.otf" "STIX2Math-subset.otf" ∠-∯
pyftsubset
Code:
pyftsubset "STIX2Math.otf" --unicodes="2220-222F" --output-file="STIX2Math-subset.otf"

Last edited by un_pogaz; 11-21-2018 at 08:00 AM.
un_pogaz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre annotations and highlight extract plugin for the Nook Simple Touch? einkuser Plugins 15 01-24-2015 08:13 PM
Install of simple plugin works on Linux and Win but not on OSX kabirmaar Development 9 07-26-2014 07:49 PM
Make a simple Plugin for Full Text Search using Recoll Satas Development 9 07-20-2013 04:15 PM
Nook Simple Touch font issue. xstealx ePub 4 11-17-2011 10:11 AM
Touch Font Change no longer works on Nook Simple? localbuyer Barnes & Noble NOOK 13 07-09-2011 11:29 AM


All times are GMT -4. The time now is 02:44 AM.


MobileRead.com is a privately owned, operated and funded community.