![]() |
#16 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 219
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
|
I wonder what will happen with JS/Wasm on older hardware readers? Will they even be able to use it, or will they become horribly slow, thinking of the underpar hardware and usually old software?
I know that my Tolino Vision 5 used Hyphenator (Hyphenopoly’s predecessor) for its "Advanced Reading Experience", and even made a new "de.js" for it. It was… well… acceptable, but that reading mode had other problems as well, so I never used it much. Guess one needs to check compatibility and performance on real hardware, testing at least for RMSDK and KOReader, probably more. Last edited by Moonbase59; 07-28-2025 at 12:31 PM. |
![]() |
![]() |
![]() |
#17 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,635
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#18 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
1. Remove the following line from the header of the sample epub I sent: Code:
<script type="text/javascript" src="../Misc/Hyphenopoly_Loader.js" ></script> After that, if the link with the .js file is enabled, Readium will show hyphenated text. |
|
![]() |
![]() |
![]() |
#20 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,635
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll check it when I get a chance. Kevin's mainly on macOS. I'm the one only primarily on Linux
Last edited by DiapDealer; 07-28-2025 at 01:29 PM. |
![]() |
![]() |
![]() |
#21 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,828
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Okay, so my problem was how I forced it to use Hyphenopoly by adding my own config info, made it ignore the path you had internally set.
So I changed the _loader.js to enable "FORCEHYPENOPOLY", in its internal config and I can see from the Inspector and the javascipt error console that the wasm file is being found and loaded and that Hyphenopoly.js is being loaded as a blob. All as expected, but how can I tell if it is actually working or not given hypehnation is built in (at least on macOS)? So this is an improvement but it requires the following change (which I just pushed to Sigil master): Code:
diff --git a/src/main.cpp b/src/main.cpp index ee33f91ce..26290878c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -372,10 +372,11 @@ int main(int argc, char *argv[]) // register the our own url scheme (this is required since Qt 5.12) QWebEngineUrlScheme sigilScheme("sigil"); - sigilScheme.setFlags(QWebEngineUrlScheme::SecureScheme | - QWebEngineUrlScheme::LocalScheme | - QWebEngineUrlScheme::LocalAccessAllowed | - QWebEngineUrlScheme::ContentSecurityPolicyIgnored); + sigilScheme.setFlags( QWebEngineUrlScheme::SecureScheme | + QWebEngineUrlScheme::LocalScheme | + QWebEngineUrlScheme::LocalAccessAllowed | + QWebEngineUrlScheme::ContentSecurityPolicyIgnored | + QWebEngineUrlScheme::FetchApiAllowed ); // sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Host); sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Path); QWebEngineUrlScheme::registerScheme(sigilScheme); Update: The problem is QWebEngineUrlScheme::FetchApiAllowed is only allowed in Qt 6.6.0 and later. I will have to ifdef that to Qt version. Last edited by KevinH; 07-28-2025 at 02:37 PM. |
![]() |
![]() |
![]() |
#22 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,828
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Okay, with only the following additional change, your Hyphenopoly should now work in Sigil.
Code:
diff --git a/src/main.cpp b/src/main.cpp index 26290878c..65145a89f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -372,11 +372,20 @@ int main(int argc, char *argv[]) // register the our own url scheme (this is required since Qt 5.12) QWebEngineUrlScheme sigilScheme("sigil"); + +#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0) + sigilScheme.setFlags( QWebEngineUrlScheme::SecureScheme | + QWebEngineUrlScheme::LocalScheme | + QWebEngineUrlScheme::LocalAccessAllowed | + QWebEngineUrlScheme::ContentSecurityPolicyIgnored ); +#else sigilScheme.setFlags( QWebEngineUrlScheme::SecureScheme | QWebEngineUrlScheme::LocalScheme | QWebEngineUrlScheme::LocalAccessAllowed | QWebEngineUrlScheme::ContentSecurityPolicyIgnored | QWebEngineUrlScheme::FetchApiAllowed ); +#endif + // sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Host); sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Path); QWebEngineUrlScheme::registerScheme(sigilScheme); I have now pushed this additional change to Sigil master. So in the next release of Sigil, Hyphenopoly should work for anyone using Sigil built with Qt 6.6 and later. We currently ship with Qt 6.8.2 and plan to move to Qt 6.9.2 (or .3) sometime in the future. |
![]() |
![]() |
![]() |
#23 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
1. In the sample epub I sent you, change the style .hyphenate to: Code:
.hyphenate { hyphens: manual; -moz-hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; } 2. Employ "FORCEHYPHENOPOLY" to force the loader to load Hyphenopoly.js and the .wasm file. 3. THIS IS VERY IMPORTANT: in your config section you must add the following: Code:
setup: { selectors: { "body": { compound: "all", leftmin: 1, // This is not neccessary but will hyphenate more words rightmin: 2 // This is not neccessary } } } Code:
Hyphenopoly.config({ require: { "es": "FORCEHYPHENOPOLY", }, paths: { patterndir: "../../META-INF/" }, setup: { selectors: { "body": { compound: "all", leftmin: 1, rightmin: 2 } } } }); Last edited by RbnJrg; 07-28-2025 at 02:48 PM. |
||
![]() |
![]() |
![]() |
#24 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Hi Kevin;
Is there any way to employ the command "Move..." in order to move a .wasm file from "Misc" to "META-INF"? |
![]() |
![]() |
![]() |
#26 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,828
Karma: 6120478
Join Date: Nov 2009
Device: many
|
I do not think that would work. The files inside META-INF aside from the container.xml and font obfuscation encryption xml are supposed to be left alone.
In fact in BookBrowser the move command strictly enforces no destination inside META-INF. It does this because the Move command means that the opf manifest and all files must have all links walked and possibly changed as a result of a Move. So files not listed in the manifest should not be moved by the Sigil Move command. Have you tried writing a plugin to move those files? Last edited by KevinH; 07-30-2025 at 10:20 AM. |
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
No, so far I've been moving those files by unpacking the epub and placing the necessary files directly into META-INF and then repackaging the epub.
WinRar provides a fairly simple way for me to do this because it opens the epub without needing to change the extension, and I can add the file from the WinRar window itself. But I was curious if I could use Sigil's "Move..." command. |
![]() |
![]() |
![]() |
#28 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,828
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Quote:
https://www.mobileread.com/forums/sh...1&postcount=34 Those testing binaries have the fetch api change in them as well. |
|
![]() |
![]() |
![]() |
#29 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,813
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
PS: Bibi Reader has the same issue with the Fecth API; by chance, would it be possible for you to enable that feature also in the plugin? (of course, if it takes you a long time, forget about it, that it's not the end of the world that Bibi doesn't support the Fetch API either.) Last edited by RbnJrg; Today at 12:54 PM. |
|
![]() |
![]() |
![]() |
#30 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,828
Karma: 6120478
Join Date: Nov 2009
Device: many
|
That is inherent to Bibi which I think must use its own scheme handler. I will take a look, although I doubt there is much I can do given the way Bibi handles files it loads.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
IngramSpark citing content.opf errors I can't find in the .opf | persand | Calibre | 4 | 03-21-2019 10:49 AM |
epub3 kobo external video opf issue | Ryn | ePub | 21 | 01-13-2018 05:34 PM |
Change opf filename from content.opf to title.opf | northstar7 | Sigil | 3 | 09-23-2013 12:44 PM |
Nook Covers OPF Issue | DTM | Sigil | 2 | 08-03-2013 05:39 PM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |