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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-12-2018, 08:35 PM   #166
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
[EDIT]
One more to go: Oh no, it is at a different codepoint!

Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/poplarstd.otf,size=100 "1234567" -M -m -c
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/poplarstd.otf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/poplarstd.otf' loaded
Printing string '1234567' @ 100pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	7.png
Views:	16
Size:	5.4 KB
ID:	167667good color, 7 in expected location.

[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/poplarstd.otf,size=100 "i" -M -m -c
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/poplarstd.otf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/poplarstd.otf' loaded
Printing string 'i' @ 100pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	i.png
Views:	14
Size:	683 Bytes
ID:	167668doesn't seg fault anymore
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/unscii-8.otf,size=86 -o -M -m -c -v < u1F680
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/unscii-8.otf' for the Regular style
Initialized libunibreak
[FBInk] Font '/mnt/us/linkfonts/fonts/unscii-8.otf' loaded
Printing OpenType text.
Unformatted text defaulting to Regular font style
Max BL: 199  Max Desc: 0  Max LG: 24
Finished looking for linebreaks
Current Measured LW: 114  Line# 0
Current Measured LW: 239  Line# 0
1 lines to be printed
Maximum printable height is 800
Actual print height is 199
Max LW: 600  Max LH: 199  Max BL: 199  FntSize: 199
Snipped Line# 0 LW down to 238
Finished printing line# 0
Refreshing region from LEFT: 180, TOP: 300, WIDTH: 239, HEIGHT: 199
Area is: x1: 0, y1: 0, x2: 600, y2: 800 with fx: 0
Detected a full-screen area, upgrading to FBIO_EINK_UPDATE_DISPLAY
[root@kindle us]# ./screenshot
Click image for larger version

Name:	u+1F860.png
Views:	14
Size:	627 Bytes
ID:	167669still no cigar, 
Click image for larger version

Name:	FontForge u+1F860.png
Views:	18
Size:	34.8 KB
ID:	167670even though it is there
[EDIT²] still no cigar after correction!?
Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/unscii-8.otf,size=86 -o -M -m -c -v < u1F860
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/unscii-8.otf' for the Regular style
Initialized libunibreak
[FBInk] Font '/mnt/us/linkfonts/fonts/unscii-8.otf' loaded
Printing OpenType text.
Unformatted text defaulting to Regular font style
Max BL: 199  Max Desc: 0  Max LG: 24
Finished looking for linebreaks
Current Measured LW: 114  Line# 0
Current Measured LW: 239  Line# 0
1 lines to be printed
Maximum printable height is 800
Actual print height is 199
Max LW: 600  Max LH: 199  Max BL: 199  FntSize: 199
Snipped Line# 0 LW down to 238
Finished printing line# 0
Refreshing region from LEFT: 180, TOP: 300, WIDTH: 239, HEIGHT: 199
Area is: x1: 0, y1: 0, x2: 600, y2: 800 with fx: 0
Detected a full-screen area, upgrading to FBIO_EINK_UPDATE_DISPLAY
Click image for larger version

Name:	u1F860.png
Views:	15
Size:	627 Bytes
ID:	167672after code point corrected

[EDIT³] @NiLuJe below. OK let me sleep on this, my brain is misfiring.

[EDIT⁴] Ah, precombined = f09fa1a0, UTF-8 in hex. Got it. Case closed.

[EDIT⁵] Click image for larger version

Name:	flying.png
Views:	17
Size:	653 Bytes
ID:	167673proof
Attached Files
File Type: zip u1F860.zip (154 Bytes, 13 views)

Last edited by PoP; 11-12-2018 at 09:28 PM.
PoP is offline   Reply With Quote
Old 11-12-2018, 08:52 PM   #167
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@PoP: Use precombined characters, we don't do any shaping/normalization, so any funky multi-code character will probably not do what you want, and will instead print those multiple codepoints separately (which is why you get two fallback characters here ).

(In this case, I simply had to c/p the rocket from your original post, as rendered by firefox, and voilà).

EDIT: Speaking of ZSH, its echo builtin should handle Unicode escapes: echo "\U1F680" does the right thing on my end .

Last edited by NiLuJe; 11-12-2018 at 10:35 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 11-14-2018, 02:36 PM   #168
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
Quote:
Originally Posted by NiLuJe View Post
@PoP: Go forth, and break stuff! ;p.
Trying.

Quote:
Originally Posted by NiLuJe View Post
@PoP: Use precombined characters, we don't do any shaping/normalization, so any funky multi-code character will probably not do what you want, and will instead print those multiple codepoints separately...
Funky Diacritical combining marks can't break it:

Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=58 -o -M -m -c "curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨʎʌɹnɔ" #curly\u1DC2\u0353\u032B\u0319\u1DCA\u0325\u032E\u033E\u036F\u0364\u036D\u036C\u0366\u0368\u028E\u028C\u0279n\u0254
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string 'curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨʎʌɹnɔ' @ 58pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: Y, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	curlycurvy.png
Views:	20
Size:	4.2 KB
ID:	167694 Ok, they don't stack up (like it shows if you quote this post) but I didn't expect them to work at all.

And

[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=58 -o -M -m -c "É vs É" # E\u0301 vs \u00C9
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string 'É vs É' @ 58pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: Y, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	É.png
Views:	15
Size:	2.4 KB
ID:	167695 isn't bad either.
PoP is offline   Reply With Quote
Old 11-14-2018, 02:43 PM   #169
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Eh, that's honestly better than I'd have expected .
NiLuJe is offline   Reply With Quote
Old 11-17-2018, 02:57 PM   #170
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
Quote:
Originally Posted by NiLuJe View Post
@PoP: Go forth, and break stuff! ;p.
At it again Some characters present in the font are printed as a boxed question mark.

Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=36 -o -M -m -c "U+13B7 Ꮇ
> U+FF2D M
> U+3289 ㊉" 
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string 'U+13B7 Ꮇ
U+FF2D M
U+3289 ㊉' @ 36pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: Y, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]#screenshot
Click image for larger version

Name:	20181117143826.png
Views:	7
Size:	4.8 KB
ID:	167773
Rendered with Symbola.ttf in Winword:

Click image for larger version

Name:	symbola in Word.png
Views:	13
Size:	53.7 KB
ID:	167774
PoP is offline   Reply With Quote
Advert
Old 11-17-2018, 06:21 PM   #171
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@PoP: Well, that was easy: they're really not in the font, so I suspect Word is pulling them from somewhere else (probably Segoe UI Symbols) .
NiLuJe is offline   Reply With Quote
Old 11-17-2018, 09:53 PM   #172
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
^ not in the font, precisely . Sorry ...winword ...sigh.

[EDIT 2018-11-18]

Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/code2000.ttf,size=36 -o -M -m -c "U+13B7 Ꮇ
> U+FF2D M
> U+3289 ㊉"
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/code2000.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/code2000.ttf' loaded
Printing string 'U+13B7 Ꮇ
U+FF2D M
U+3289 ㊉' @ 36pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: Y, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	20181118091225.png
Views:	6
Size:	5.3 KB
ID:	167800  with trusty code2000
[EDIT 2018-11-19] At least I learned about Microsoft's uniscribe font fallback!

Last edited by PoP; 11-19-2018 at 04:42 PM.
PoP is offline   Reply With Quote
Old 11-22-2018, 02:00 AM   #173
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Of potential interest to people with a strong aversion to C, or for whatever reason (prototyping?), I've whipped up basic FFI bindings for LuaJIT & Python .

The Python bindings are bundled in my usual Python package .

The full list of available bindings is in the README. Right now, that's @sherman's Go bindings and those two .
NiLuJe is offline   Reply With Quote
Old 11-22-2018, 05:52 PM   #174
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Released v1.9.2!

Mainly a bunch of bugfixes around OpenType/TrueType rendering, as well as adding the ability to inhibit eInk refreshes, in case you want to do a bunch of things in quick succession.
Oh, and support for negative margins in OT/TTF rendering to make it easier to align stuff to the bottom/right edges .

As mentioned earlier, this also introduces Python & Lua bindings, for when shell scripting can't quite cut it anymore . And, in the spirit of helping people to avoid having to set-up a cross-compilation toolchain, here's a LuaJIT binary .
Attached Files
File Type: gz LuaJIT-v2.1-kindle.tar.gz (1.14 MB, 9 views)

Last edited by NiLuJe; 11-22-2018 at 06:05 PM.
NiLuJe is offline   Reply With Quote
Old 11-25-2018, 09:30 PM   #175
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
I wanted to center a tall integral on the screen an another funky character pleasantly surprised me

First I used LF
Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=72 -M -m -c "⌠
> ⎮
> ⌡"  #Tall integral with line feeds U+0A
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string '⌠
⎮
⌡' @ 72pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y, skip refresh: N)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	LF0A.png
Views:	7
Size:	1.7 KB
ID:	168012 is centered and halfway as expected
Then I used LS, and was surprised that it also worked!
Code:
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=72 -M -m -c "⌠
> ⎮
> ⌡"  #Tall integral with line separators U+2028
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string '⌠
⎮
⌡' @ 72pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y, skip refresh: N)
[root@kindle us]# ./screenshot
Click image for larger version

Name:	LS2320.png
Views:	8
Size:	1.7 KB
ID:	168013 remarkably, is also centered and halfway

Last edited by PoP; 11-28-2018 at 11:58 AM. Reason: U+ typo
PoP is offline   Reply With Quote
Old 11-25-2018, 10:17 PM   #176
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 511
Karma: 1167141
Join Date: Sep 2008
Location: Auckland - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo, Kobo Aura H2O
Yeah, the OTF/TTF path outsources linebreaking to a library which implements the Unicode line breaking algorithm (UAX #14).

I'm glad to see it works!
sherman is offline   Reply With Quote
Old 12-09-2018, 05:06 PM   #177
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,082
Karma: 35999999
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₁.₁
Quote:
Originally Posted by sherman View Post
Yeah, the OTF/TTF path outsources linebreaking to a library which implements the Unicode line breaking algorithm (UAX #14).

I'm glad to see it works!
Probably out of scope here, and no big deal:

Reading the #14 annex I think that U+00AD (SHY), funky Soft Hyphens, should only be rendered at line break versus U+2010 Hyphens which should always be visible.

Code:
Using username "root".
[root@kindle us]# fbink -t regular=/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf,size=72 -M -m -c "S*O*F*T
> vs
> H‐A‐R‐D" # where "*" are U+00AD "-" are U+2010 
[FBInk] Enabled Legacy einkfb Kindle quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes
[FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background
Loading font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' for the Regular style
[FBInk] Font '/mnt/us/linkfonts/fonts/Symbola_Hinted.ttf' loaded
Printing string 'S*O*F*T
vs
H‐A‐R‐D' @ 72pt, honoring the following margins { Top: 0px, Bottom: 0px, Left: 0px, Right: 0px } (formatted: N, overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, H align: 0, halfway: Y, V align: 0, clear screen: Y, skip refresh: N)
[root@kindle us]# ,/screenshot
-sh: ,/screenshot: not found
[root@kindle us]# ./screenshot
Click image for larger version

Name:	SOFTvsHARD.png
Views:	1
Size:	6.3 KB
ID:	168254 was expecting SOFT vs H-A-R-D
[root@kindle us]#

Last edited by PoP; 12-09-2018 at 05:10 PM.
PoP is offline   Reply With Quote
Old 12-09-2018, 05:20 PM   #178
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@PoP: No layout engine, so if there's space to print it, it'll get printed .

I'd imagine libunibreak will of course use those as viable break points, but that's irrelevant when there's no need to break .
NiLuJe is offline   Reply With Quote
Old 12-09-2018, 05:34 PM   #179
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 511
Karma: 1167141
Join Date: Sep 2008
Location: Auckland - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo, Kobo Aura H2O
Yeah, I didn't want to open up the can of worms that is sophisticated layout. Text layout is HARD, especially especially once one starts dealing with characters that may or may not be printed depending on the situation.

The main reason for choosing libunibreak was because I wanted better line breaking than what was currently in FBInk at the time, but I didn't want to deal with figuring out all the rules myself, especially since I'm a native english speaker, and don't know the rules for other languages.

If I wanted to do 'proper' text layout for an application, I would probably just use Pango and call it a day. Unfortunately, Pango requires fontconfig, which makes it much harder to get working on a barebones linux like the Kobos. Harfbuzz would also work (it's lower level, so requires more work than Pango), but the Harfbuzz documentation is.... anemic.

Last edited by sherman; 12-09-2018 at 05:37 PM.
sherman is offline   Reply With Quote
Old 12-09-2018, 05:50 PM   #180
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,916
Karma: 9469999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
I wholeheartedly agree with that HB statement, trying to figure how things were supposed to go in CRe/KOReader was... not fun? .

raqm tries to make this slightly less painful, but devising the best way to do things "right" is still fairly obscure.

Last edited by NiLuJe; 12-09-2018 at 06:45 PM.
NiLuJe is offline   Reply With Quote
Reply

Tags
eips, fbink

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FBInk: A small tool/library to print crap on your screen! NiLuJe Kobo Developer's Corner 83 Yesterday 01:31 PM
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 print breezeman Introduce Yourself 13 07-03-2011 10:02 AM


All times are GMT -4. The time now is 03:40 AM.


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