简体   繁体   English

iPhone epub阅读器如何以编程方式更改字体大小/颜色?

[英]iphone epub reader how to change the font size/color programmatically?

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内容阅读和自定义的框架。

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文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM