iphone epub reader如何以编程方式更改字体大小/颜色?

时间:2021-08-06 23:39:21

I have seen many projects that reads epub files than parsing it to XML formats.

我见过许多读取epub文件的项目,而不是将其解析为XML格式。

Some projects uses HTML to display the formatted ftext in a web view

某些项目使用HTML在Web视图中显示格式化的ftext

Is there any way possible way to change the color/size of a font?

有没有办法改变字体的颜色/大小?

I think some are including Java Script files but still not sure...

我认为有些包括Java Script文件,但仍然不确定......

Any framework that rcan help for epub content reading and customiziing....

任何可以帮助epub内容阅读和自定义的框架....

1 个解决方案

#1


1  

ePub uses XHTML & CSS for content, so most (if not all) ePub readers will use a UIWebView.

ePub使用XHTML和CSS作为内容,因此大多数(如果不是全部)ePub阅读器将使用UIWebView。

Changing the font color & size, then, is simply a matter of fiddling with said UIWebView's stylesheets, whether through JavaScript or altering the XHTML/CSS files directly.

然后,更改字体颜色和大小只是摆弄所述UIWebView的样式表,无论是通过JavaScript还是直接更改XHTML / CSS文件。

#1


1  

ePub uses XHTML & CSS for content, so most (if not all) ePub readers will use a UIWebView.

ePub使用XHTML和CSS作为内容,因此大多数(如果不是全部)ePub阅读器将使用UIWebView。

Changing the font color & size, then, is simply a matter of fiddling with said UIWebView's stylesheets, whether through JavaScript or altering the XHTML/CSS files directly.

然后,更改字体颜色和大小只是摆弄所述UIWebView的样式表,无论是通过JavaScript还是直接更改XHTML / CSS文件。