11-02-2018, 06:18 PM | #46 | |||
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
Quote:
Quote:
Otherwise great! I will try to find a way to use this in my FlashCard mod.[/QUOTE] Thanks for testing. I'm afraid I'm an english only speaker, so it's helpful to get reports from people trying to use different languages! |
|||
11-02-2018, 06:18 PM | #47 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
* Yup, it's an uint8_t, I *think* nothing useful will ever come of >255pt, but I forgot to check, and at the very least we should catch a wrap like that (or just switch to an ushort and forget about it? ) .
* UTF8 handling *looked* sound, but I'll double-check . I did quickly try CJK stuff, but, err, since I don't read it, I failed to notice missing stuff . EDIT: Too late ;p. Last edited by NiLuJe; 11-02-2018 at 06:25 PM. |
Advert | |
|
11-02-2018, 06:25 PM | #48 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
|
|
11-02-2018, 06:38 PM | #49 | |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
Print '漢' and it shows 漢 Print '漢字' and it still shows 漢 Print '漢字--' and it shows 漢字 Print '漢字----' and it still shows 漢字 Print '漢字-----' it shows 漢字- It's like it knows it has to show 2 characters, then calls it quits after processing 3 bytes (which is only one character). 漢字 is six bytes and additional - character only shows up when providing a 7 character string. So instead of showing 7 characters as requested, it shows 7 bytes. And providing 漢字-- (4 characters string) causes the next character to show up (漢字) because the first character only consumed 3 bytes. So much for my guess without looking at any code at all |
|
11-02-2018, 06:49 PM | #50 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
@NiLuJe
255pt is actually about the same size as I use here ( flashcard example for 森 character https://www.mobileread.com/forums/at...6&d=1540719095 ) But this is on my H2O, wouldn't it need to be larger on 8"-10" or higher res readers? (Is pt DPI dependent or just pixels?) This just to illustrate why I wanted to print a huge character... I wouldn't have complained if 65536pt -> 0pt. I just went to 256pt by trial&error cause 32 64 128 was too small after all Last edited by frostschutz; 11-02-2018 at 06:51 PM. |
Advert | |
|
11-02-2018, 06:54 PM | #51 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
|
|
11-02-2018, 06:58 PM | #52 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@sherman: I'll be busy for the next few hours, so, go ahead .
Initial findings would point to the fact that the various c_index vs. chars_in_str checks are wrong, because c_index is the *byte* index in the string array, while chars_in_str is the amount of unicode "characters". Since bytes >= unicode chars, drift slowly accumulates as more multi-byte characters are encountered, and we abort the loop early. Of lesser import, the md parser stuff is also massively not unicode aware, but we already knew that ;p. ---- And, yeah, now that I've checked, I can see somewhat valid use cases for >255pt, so that's an easy fix, at least . Last edited by NiLuJe; 11-02-2018 at 07:03 PM. |
11-02-2018, 07:00 PM | #53 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
|
|
11-02-2018, 07:21 PM | #54 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
well, I won't complain about the md stuff
I'm happy already to have it work as well as it does, half expected it to not handle megabytes-large fonts but it works just fine this is a huge step forward, thank you so much |
11-02-2018, 08:08 PM | #55 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Hi frostschutz,
Here's a test version of FBInk, which hopefully fixes the issues you've raised. Can you test and let me know if it does? Especially the CJK stuff. It allows for font sizes greater than 255 as well, although be aware, your print area needs to be large enough to support it, otherwise nothing will show on screen. |
11-02-2018, 08:37 PM | #56 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
it seems to work fine, thank you
|
11-02-2018, 08:38 PM | #57 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
No problem... It was my own silly mistake that caused the issue in the first place.
EDIT: And PR submitted to NiLuJe Last edited by sherman; 11-02-2018 at 08:43 PM. |
11-03-2018, 07:45 AM | #58 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Also, a quick note on the md parser not being unicode aware, from my point of view, I don't think it needs to be. It just iterates over bytes, and if it sees the ASCII '*' or '_' characters, it triggers an action. Otherwise, the text stream is seen as an opaque sequence of bytes, because it doesn't care about them.
In other words, it should handle any input you give it, regardless of whether it's english or not. On the other hand, it has no concept of whether a given language even supports bold/italics, but it's up to the user to figure that one out in my opinion. |
11-03-2018, 12:43 PM | #59 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@sherman: Yeah, for some reason, I was worried it'd flag stuff in-between multi-byte characters, but no, after a good night's sleep and some testing, things appear to work well (at least with Latin scripts, so, 2 or 3 bytes) .
This just made me mad at Kobo again for their broken libc because I have to swap to a custom busybox shell to actually be able to input utf8 in my terminal, but, oh, well . Last edited by NiLuJe; 11-03-2018 at 01:06 PM. |
11-03-2018, 06:39 PM | #60 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Small tool for filling book library in Kobo Aura | Paxerus | Kobo Developer's Corner | 2 | 12-31-2013 08:05 PM |
Small print | Broadback | Conversion | 12 | 12-12-2011 03:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 04:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 10:02 AM |