Hi there,
I've integrated HtmlRenderer into my program and it is a huge improvement over the RichTextBox. Scrolling is smoother and flicker free, and it supports transaprency AND font smooting at the same time, which is a huge bonus. I was pleased to find that HtmlPanel supports Transparency as well, not just the HtmlLabel.
However, one thing I haven't been able to figure out a solution to is how to use fonts that aren't installed on the system, but are embedded in my application. I deploy TTF's as an embedded resource within the exe, and create Font objects at runtime out of them which can then be assigned to Windows Forms controls. This way, less common fonts such as Moderne Fraktur and Apple Garamond can be successfully used within the application, without ever having been installed to the system. Yes, it does work. ;-)
The problem is it seems that HtmlRenderer will only pick these fonts up by default if they are installed in the system (not a suprise naturally). I'd rather not have my application install them into the system if it is not necessary. Normally I would have an installer put these font files into the system, but this application IS an installer/launcher/patcher, and will not have it's own installation package. It's essentially a bootstrapping download agent that doubles as the patcher and launcher for a MMO game. You download and run this small program, log in, and then it deploys the rest of the game over the Internet. So far it doesn't touch anything outside of the game deployment dir or user AppData, and I'd like to keep it that way.
Is there any straight-forward way to "feed" the fonts I've loaded into memory into the HtmlRenderer so that when font-family styles are evaluated, it will find and use them?
Thanks,
Ryan
I've integrated HtmlRenderer into my program and it is a huge improvement over the RichTextBox. Scrolling is smoother and flicker free, and it supports transaprency AND font smooting at the same time, which is a huge bonus. I was pleased to find that HtmlPanel supports Transparency as well, not just the HtmlLabel.
However, one thing I haven't been able to figure out a solution to is how to use fonts that aren't installed on the system, but are embedded in my application. I deploy TTF's as an embedded resource within the exe, and create Font objects at runtime out of them which can then be assigned to Windows Forms controls. This way, less common fonts such as Moderne Fraktur and Apple Garamond can be successfully used within the application, without ever having been installed to the system. Yes, it does work. ;-)
The problem is it seems that HtmlRenderer will only pick these fonts up by default if they are installed in the system (not a suprise naturally). I'd rather not have my application install them into the system if it is not necessary. Normally I would have an installer put these font files into the system, but this application IS an installer/launcher/patcher, and will not have it's own installation package. It's essentially a bootstrapping download agent that doubles as the patcher and launcher for a MMO game. You download and run this small program, log in, and then it deploys the rest of the game over the Internet. So far it doesn't touch anything outside of the game deployment dir or user AppData, and I'd like to keep it that way.
Is there any straight-forward way to "feed" the fonts I've loaded into memory into the HtmlRenderer so that when font-family styles are evaluated, it will find and use them?
Thanks,
Ryan