Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: loss of font fidelity (missing ClearType?)

$
0
0
Weird... it works perfectly for me:
Image

Let's try to reproduce it in HTML Renderer demo app.
Add your fonts to the custom fonts loading in DemoForm.LoadCustomFonts method:
private void LoadCustomFonts()
{
    // load custom font font into private fonts collection
    var file = Path.GetTempFileName();
    File.WriteAllBytes(file, Resources.CustomFont);
    _privateFont.AddFontFile(file);

    _privateFont.AddFontFile(@"D:\fonts\ModerneFraktur.ttf");
    _privateFont.AddFontFile(@"D:\fonts\AppleGaramond.ttf");
            
    // add the fonts to renderer
    foreach (var fontFamily in _privateFont.Families)
        HtmlRender.AddFontFamily(fontFamily);
}
Run the demo and paste the html snippet in the editor:
<div style="font: 30px 'Moderne fraktur'">
  This is a custom font that is not installed on the system.
</div>
<div style="font: 30px 'Apple Garamond'">
  This is a custom font that is not installed on the system.
</div> 
Let me know whats the result.

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>