Page 1 of 1
Setting default font in Writer/Web
Posted: Fri Jan 11, 2008 3:14 pm
by sschaub
Using OO 2.3.1 on Windows Vista
Is it possible to change the default font for an HTML document in Writer/Web?
When I right-click on the Default style in the styles list and change it to Verdana font, that changes the default paragraph font. But it doesn't change the font for headings.
I looked at the HTML source after changing the font of the Default style to Verdana and saw this:
Code: Select all
<STYLE TYPE="text/css">
<!--
P.western { font-family: "Verdana", sans-serif }
-->
</STYLE>
I tried modifying the <STYLE> section by inserting a default font rule for the body, like this:
Code: Select all
<STYLE TYPE="text/css">
<!--
P.western { font-family: "Verdana", sans-serif }
body { font-family: "Verdana", sans-serif }
-->
</STYLE>
However, when I switch back to normal document view in Writer, that body rule gets deleted (is this a known bug?).
I'm thinking of filing a bug on this (I searched the bug database and didn't see anything related), but thought I would post first, in case I'm confused, or this functionality is somehow by design.
Thanks in advance for any feedback.
Stephen
Re: Setting default font in Writer/Web
Posted: Fri Jan 11, 2008 3:34 pm
by foxcole
My only recommendation is that if you want an HTML editor that behaves like an HTML editor, use an HTML editor. A word processor just doesn't function the same way. I suspect that the headings aren't being changed because their definitions are purposely kept separate from the body text, unless you have linked them in their style definitions (see the Styles and Formatting pane).
For the level of control you want, use KompoZer or similar tool that's designed for the job you're trying to do. Here's a link to the portable version, which I use and am quite happy with:
http://portableapps.com/news/2007-12-05 ... revision_2
Re: Setting default font in Writer/Web
Posted: Fri Jan 11, 2008 8:18 pm
by acknak
Are you using the "Web layout" view with a normal Writer document? Or are you working with a "Web Page" document (File > New > HTML Document)? They are two very different animals.
Using the HTML Document, the text styles translate to CSS as you would expect. However, the predefined styles (the headings anyway) are defined such that each "Heading N" style derives from the next higher level, but it has it's own settings for the type style so it does not inherit those from anywhere. You have to adjust all the settings for each one, rather than having one base style that specified the font face, and then the others simply adjust the size.
Of course, you can redefine them to inherit the settings however you like--that all seems to work for me using Writer/Web with an HTML document. I can set a base font in the "Default" style and have that inherited by all the headings, but I had to redefine the styles to get the proper inheritance.
Re: Setting default font in Writer/Web
Posted: Sat Jan 12, 2008 12:07 am
by sschaub
To clarify, I am using a "Web Page" document.
I understand acknak's points about the heading linked styles. I sure wish OpenOffice supported the ability of a web page to link to a CSS file. That would solve a lot of my problems.
Re: Setting default font in Writer/Web
Posted: Sat Jan 12, 2008 2:39 am
by foxcole
sschaub wrote:To clarify, I am using a "Web Page" document.
I understand acknak's points about the heading linked styles. I sure wish OpenOffice supported the ability of a web page to link to a CSS file. That would solve a lot of my problems.
KompoZer would also solve a lot of your problems. Give it a try... why not? It's GNU open source, it's free, it's powerful, it's WYSIWYG and HTML editor all wrapped into one, and it makes web page authoring a cakewalk. Is there a specific reason you trying to use Writer for HTML?
Re: Setting default font in Writer/Web
Posted: Sat Jan 12, 2008 7:49 pm
by sschaub
foxcole wrote:
KompoZer would also solve a lot of your problems. Give it a try... why not? It's GNU open source, it's free, it's powerful, it's WYSIWYG and HTML editor all wrapped into one, and it makes web page authoring a cakewalk. Is there a specific reason you trying to use Writer for HTML?
One important requirement for me is the ability to easily take a screen shot and paste it into an HTML document. OpenOffice does this very nicely -- auto-generates a filename for the pasted screen shot, and saves it as a .jpg. Does KompoZer do that?
Further, I've used OO for a couple of years now to generate my course content, and I'm comfortable with it. I'm reluctant to switch!