1
votes

I would like to access the Internet Explorer user settings for fonts, especially the font family, within a Browser Helper Object written in C#.

I have looked into SHDocVw.WebBrowser and IHTMLDocument( to 5) but I don't see what I'm looking for or missing the property.

The BHO is for Internet Explorer 7.

Thank you very much!

Edit: Richard asks why I need this information: The font-family you can adjust in the IE7 settings is used if the given font-families by the HTML document or CSS are not installed on the system. I need this application-based font-family which is used to render the text in the last instance (if all other information fail).

1
Why? (This might help answer the question.)Richard
I too, am curious why you need it. Your explanation doesn't quite address why you need to know what they've set their browser to. (As it's an add-on, I'm assuming this isn't necessarily a web-based product/app?)DA.
No it wasn't for a web-based product. The BHO took all the document information and sent it to a middleware which interpreted the document and rendered it on a hardware device for visually-impaired people (you can see the device here: hyperbraille.de - site is in German). The goal was to make a most accurate representation of the web document, so font info were necessary. The device allowed zooming in/out and scrolling in the document. It could render 4 screens per sec with pins which the person can make out by touch. Text could be switched from the real text to braille and vice versa.Mil

1 Answers

0
votes

What you need to do is use a degrading setting for the font-family in CSS.

font-family: "Font 1", "Font 2", "Font 3" // etc

The first font is the one you want to use, the 2nd one is the one that is similar but more users have, then the 3rd one is the safety font. You could keep going but here's an example.

font-family: "Calibri", arial, sans-serif

In this example only Vista and Office 2008 have Calibri, other Windows machines have Arial and then Linux machines have sans-serif.