문제

Im rendering normal text along with MathML content in a UIWebview, scalesPageToFit property enabled and and my syntax of displaying data is startHtml and endHtml is as below,

startHTML=[NSString stringWithFormat:@"<html><Head><Meta Content-Type=\"text/mathml\"/>\
               <script type=\"text/javascript\" src=\"%@?config=MML_HTMLorMML-full\"></script>\
               </head>\
               <body style=\'padding:25px 15px 15px 25px\'>\
               <font face='Calibri' size='28'>",scriptFilePath];

endHtml=@"</font></body></html>";

inside startHtml string i'm mentioning font style and its weight but whatever the actual font size im mentioning here is not getting reflected since webviews scalesPageToFit is overriding it, if i disable scalesPageToFit property alignment and MathMl rendering is getting messed up.

How to maintain custom font size with scalesPageToFit property enabled?

도움이 되었습니까?

해결책

Don't use pixel values for your font size. I think percent would probably be best.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top