This is an automated archive made by the Lemmit Bot.
The original was posted on /r/rust by /u/ImpressiveHead69420 on 2024-11-04 13:37:09+00:00.
So I bought a kindle (Kindle Paperwhite Signature Edition 2024, thank you for asking) and naturally I wanted to be able to read the rust book on it. Simply saving the html version of the rust book as a pdf doesn’t work as you can’t scale things properly and the kindle simply has too small of a screen. But I was determined and I realized that these ebook file formats like epub and azw3 basically rely on html for the ebook to have a scaleable and modifiable experience. So I ctrl-s saved the printable format of the rust book and then used Calibre and added it to my computer library. Then I used it to upload the html to my kindle where it automatically converted it’s file type to AZW3 (what kindle uses). It worked however I wasn’t able to change the font size of the normal text. I thought this was strange and obviously a problem so I took a look at the CSS and found this:
.light {
-webkit-text-size-adjust: none;
text-size-adjust: none;
font-family: "Open Sans", sans-serif;
font-size: 0.625em;
}
Now I’m sure there’s some Calibre setting which can be used to strip the CSS of unwanted styling, however I don’t care. So I simply commented the parts out which were messing with it:
.light {
/* -webkit-text-size-adjust: none; */
/* text-size-adjust: none; */
font-family: "Open Sans", sans-serif;
/* font-size: 0.625em; */
}
Saved it, then deleted the old file from my kindle and reuploaded it. Voilà, it worked perfectly. If you can’t be bothered to do it yourself I guess ask me because I can’t be bothered to upload it to dropbox or google drive.