How would I go about adding fonts to the font-family list when exporting RVF to HTML? for example, if Verdana is chosen, I need to have font-family: verdana, arial, sans-serif; . I need to insure nice rendering on all machines and OS's.
Thanks, Dan
CSS - Font family
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This sounds good to me but I'm not really qualified to give you any advice at this level.Sergey Tkachenko wrote:... May be an event for TRVStyle where you can return font-family for the given font name?
My humble opinion is that it would be nice to have some kind of a "WebFontsCombobox" component holding pre-defined fonts known to be ok to use on webpages (a set of pre-def. fonts for each CharSet?). When a font is selected in this combo, it would be the one used on the RV document.
At HTML export time, the selected font would by the first one in the font-family list, followed by its closest match, then by the name of the family itself (serif, sans-serif, cursive etc.).
Example: Times New Roman is selected. CSS would say font-family:"Times New Roman", "New York", serif;. If none of these fonts are available on the client, the user agent will take any font from the Serif family.
Pre-defining these fonts (hard coded) would probably be ok since there is not much room for fantasy in this matter. Again, this is just an idea.
If it can help, I can send you a list of Web compatible fonts that I am providing in my app. (which mainly writes webpages with the help of TRV).
As I mentioned before, the HTML export capabilities of your components are outstanding and it would be great to implement this even further.
Have a nice day, Dan
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I received your file.
I think the best solution is implementing this feature in absolute transparent way. I.e., when the user applies one of these fonts, the proper font family is used for saving CSS.
This change will be uploaded in the next update, probably already today.
Note: not only Webdings and Wingdings, but any SYMBOL_CHARSET font, including Symbol, is not displayed in Opera & Firefox correctly (by their ideology, every character in HTML must have Unicode code, and SYMBOL_CHARSET fonts violate this rule).
TRichView converts text of Symbol font to the most similar Unicode equivalent, and use another font instead of Symbol.
It does nothing with Webdings and Wingdings because almost all their charcters do not have Unicode equivalents (or at least they are not included in the most of modern fonts)
I think the best solution is implementing this feature in absolute transparent way. I.e., when the user applies one of these fonts, the proper font family is used for saving CSS.
This change will be uploaded in the next update, probably already today.
Note: not only Webdings and Wingdings, but any SYMBOL_CHARSET font, including Symbol, is not displayed in Opera & Firefox correctly (by their ideology, every character in HTML must have Unicode code, and SYMBOL_CHARSET fonts violate this rule).
TRichView converts text of Symbol font to the most similar Unicode equivalent, and use another font instead of Symbol.
It does nothing with Webdings and Wingdings because almost all their charcters do not have Unicode equivalents (or at least they are not included in the most of modern fonts)
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: