Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

windows phone 7 - how to apply custom font to web browser content WP7

Am developing simple app for learning webBrowser concept in Windows phone. My aim is to display the content in Telugu(Indian language) in my WP7. that web application is displaying Telugu content only

my MainPage.xaml.cs code is :

private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
    {
        webBrowser1.Navigate(new Uri("http://www.eenadu.net", UriKind.Absolute));
    }

in MainPage.xaml file

<phone:WebBrowser HorizontalAlignment="Left" Margin="0,92,0,0" Name="webBrowser1"
 VerticalAlignment="Top" Height="575" Width="468" FontFamily="Fonts/eenadu.ttf#Eenadu"  />

and i have included that .ttf file in my project under Fonts folder and assigned Build Action = 'Content'

Am able to call the URL but it displaying unreadable characters.

is there any other way to apply custom font to web browser control?

Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Windows phone supports web fonts. However, they cannot be embedded in the XAP. Suggested workaround is to host the fonts on a remote server and perhaps use AppCache to keep the font files locally on the device.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...