[Bug]: Font size slider only affects line spacing - web and app #1307

Open
opened 2026-04-24 23:39:10 +02:00 by adam · 7 comments
Owner

Originally created by @frollard on GitHub (Aug 5, 2023).

https://github.com/advplyr/audiobookshelf-app/issues/745

Nothing found in search:

Running v2.3.3 in Docker
Web-view, Chrome 115.0.57
Window scaling 100%

both font size and line spacing only affect line spacing
Default:
Default
Font 200%
Font size
Spacing 200%
Spacing
Both 200%
Both

If I change chrome scaling it affects the page, but also all the UI elements, and they start to stack badly.

Inspecting the text element, it seems the sliders are both affecting relative row height, but not font size.
image

Edit to add: Android app behaviour is the same in 0.9.65-beta

Steps to reproduce the issue

  1. load any epub or text in abs web or abs mobile
  2. Use fancy new font size modal
  3. Watch as only line spacing changes with both sliders.

Audiobookshelf version

2.3.3

How are you running audiobookshelf?

Docker

Originally created by @frollard on GitHub (Aug 5, 2023). https://github.com/advplyr/audiobookshelf-app/issues/745 Nothing found in search: Running v2.3.3 in Docker Web-view, Chrome 115.0.57 Window scaling 100% both font size and line spacing only affect line spacing Default: ![Default](https://github.com/advplyr/audiobookshelf-app/assets/1535306/32685809-cc63-4692-b8d2-5d95eb4fbf0e) Font 200% ![Font size](https://github.com/advplyr/audiobookshelf-app/assets/1535306/ebf0b4fb-dce6-4040-bf02-f635ff1e42e5) Spacing 200% ![Spacing](https://github.com/advplyr/audiobookshelf-app/assets/1535306/a31caf6b-4b5e-4f86-b779-3a57d1027a93) Both 200% ![Both](https://github.com/advplyr/audiobookshelf-app/assets/1535306/a407a3e0-b801-41f9-92f9-71ce349bc139) If I change chrome scaling it affects the page, but also all the UI elements, and they start to stack badly. Inspecting the text element, it seems the sliders are both affecting relative row height, but not font size. ![image](https://github.com/advplyr/audiobookshelf-app/assets/1535306/31bd0f82-c569-4380-a273-9a46b3b5c507) Edit to add: Android app behaviour is the same in 0.9.65-beta ### Steps to reproduce the issue 1. load any epub or text in abs web or abs mobile 2. Use fancy new font size modal 3. Watch as only line spacing changes with both sliders. ### Audiobookshelf version 2.3.3 ### How are you running audiobookshelf? Docker
adam added the bugebooks labels 2026-04-24 23:39:10 +02:00
Author
Owner

@nichwall commented on GitHub (Aug 11, 2023):

I was unable to reproduce this using server version 2.3.3 with Android app 0.9.65 and mobile browser (Brave) with an epub. Font and spacing was scaled correctly using both sliders.

Does this occur with other epub files?

@nichwall commented on GitHub (Aug 11, 2023): I was unable to reproduce this using server version 2.3.3 with Android app 0.9.65 and mobile browser (Brave) with an epub. Font and spacing was scaled correctly using both sliders. Does this occur with other epub files?
Author
Owner

@lwobniar commented on GitHub (Aug 21, 2023):

I have experienced this issue as well, and it only happens to certain epub files. I have no idea what's special about these particular epub files, but a temporary solution I found was to use Calibre to "convert" the file to epub again and the new epub file will become scalable.

It would be nice if I don't have to convert these epubs everytime though.

@lwobniar commented on GitHub (Aug 21, 2023): I have experienced this issue as well, and it only happens to certain epub files. I have no idea what's special about these particular epub files, but a temporary solution I found was to use Calibre to "convert" the file to epub again and the new epub file will become scalable. It would be nice if I don't have to convert these epubs everytime though.
Author
Owner

@nichwall commented on GitHub (Aug 21, 2023):

Would you be willing to provide an ePub file that doesn't work and the converted file?

@nichwall commented on GitHub (Aug 21, 2023): Would you be willing to provide an ePub file that doesn't work and the converted file?
Author
Owner

@lwobniar commented on GitHub (Aug 22, 2023):

Would you be willing to provide an ePub file that doesn't work and the converted file?

Sure. How can I send it over?

@lwobniar commented on GitHub (Aug 22, 2023): > Would you be willing to provide an ePub file that doesn't work and the converted file? Sure. How can I send it over?
Author
Owner

@nichwall commented on GitHub (Aug 22, 2023):

Either the email on GH profile or DM on Discord (nyxholas on the ABS Discord if you're part of it) works for me

@nichwall commented on GitHub (Aug 22, 2023): Either the email on GH profile or DM on Discord (nyxholas on the ABS Discord if you're part of it) works for me
Author
Owner

@nichwall commented on GitHub (Aug 26, 2023):

I think I've found the problem. Using the provided original and Calibre-converted files by lwobniar, it looks like a problem with the CSS. In the original file, the paragraphs are defined like the following:

.bmtx1  {
display: block;
font-size: small;
text-align: justify;
text-indent:0.0px;
margin-top:7.5px;
margin-bottom:7.5px;
}

The converted book uses fonts like this:

.bmtx {
  display: block;
  font-size: 0.77419em;
  text-align: justify;
  text-indent: 15px;
}

The important part is the font-size is a number after converting, because the font can't be scaled by a numeric multiplier when it's defined as x-small, small, medium, or large. I tested changing just the font-size in the original epub CSS from small to 1em, and the corresponding paragraphs correctly scaled.

Some possible fixes (not sure which would be best):

  • Use a different Epub renderer (seems like this would fix several other problems, but I haven't found a better one for ABS's use case either)
  • Include the ability to interface with Calibre or another conversion program (like the m4b creation). I don't think it needs to be automatic and apply to all library items at this point, but providing a button when editing an item would probably work
  • Baked in conversion (really don't like this one since other tools already exist)
@nichwall commented on GitHub (Aug 26, 2023): I think I've found the problem. Using the provided original and Calibre-converted files by lwobniar, it looks like a problem with the CSS. In the original file, the paragraphs are defined like the following: ``` .bmtx1 { display: block; font-size: small; text-align: justify; text-indent:0.0px; margin-top:7.5px; margin-bottom:7.5px; } ``` The converted book uses fonts like this: ``` .bmtx { display: block; font-size: 0.77419em; text-align: justify; text-indent: 15px; } ``` The important part is the `font-size` is a number after converting, because the font can't be scaled by a numeric multiplier when it's defined as `x-small`, `small`, `medium`, or `large`. I tested changing just the `font-size` in the original epub CSS from `small` to `1em`, and the corresponding paragraphs correctly scaled. Some possible fixes (not sure which would be best): - Use a different Epub renderer (seems like this would fix several other problems, but I haven't found a better one for ABS's use case either) - Include the ability to interface with Calibre or another conversion program (like the m4b creation). I don't think it needs to be automatic and apply to all library items at this point, but providing a button when editing an item would probably work - Baked in conversion (really don't like this one since other tools already exist)
Author
Owner

@advplyr commented on GitHub (Aug 29, 2023):

@nichwall We may be able to look for and replace those string font-sizes easy enough. I'm not sure yet though. Can you send me that epub for testing?

@advplyr commented on GitHub (Aug 29, 2023): @nichwall We may be able to look for and replace those string font-sizes easy enough. I'm not sure yet though. Can you send me that epub for testing?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1307