https://bugs.documentfoundation.org/show_bug.cgi?id=162131
Bug ID: 162131
Summary: Gratuitous, font tag wrapping language span when
saving as HTML
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: filters and storage
Assignee: [email protected]
Reporter: [email protected]
Reproduction instructions:
1. Create a new Writer document.
2. Ensure your default direction is LTR and default paragraph style direction
LTR.
3. (Maybe) have some sort of _IL locale, and a Hebrew keyboard layout? Not
sure)
3. Enter the following text: אחת, שתיים
4. On the menus, File > Save > HTML
You get something like the following (dropping the meta tags for brevity):
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@page { size: 21cm 29.7cm; margin: 2cm }
p { line-height: 120%; margin-bottom: 0.25cm; background: transparent }
p.ctl { font-family: "Nachlieli CLM" }
a:link { color: #000080; text-decoration: underline }
a:visited { color: #800000; text-decoration: underline }
</style>
</head>
<body lang="en-IL" link="#000080" vlink="#800000" dir="ltr">
<p class="western" style="line-height: 100%; margin-bottom: 0cm">
One, two</p>
<p class="western" style="line-height: 100%; margin-bottom: 0cm">
<font face="Nachlieli CLM"><span lang="he-IL">אחת שתיים</span></font>,
<font face="Nachlieli CLM"><span lang="he-IL">ושלוש</span></font>.</p>
</body>
</html>
Ignoring the question of whether we should have these spans, and why there are
two of them instead of one (see bug 93716) - note we have a font tag wrapping
each span tag. This is silly.
Alternative 1
==============
The minimum and simplest thing to do would be:
<span lang="he-IL" style="font-family: Nachlieli CLM">אחת שתיים</span>
Alternative 2
==============
Something better would be using the styles. A simple use of the styles could
be:
span.ctl { font-family: "Nachlieli CLM" }
and then:
<span lang="he-IL" class=ctl>אחת שתיים</span>
Alternative 3
==============
A more complex use of styles:
span[lang=he-IL] { font-family: "Nachlieli CLM"; }
and then just:
<span lang="he-IL">אחת שתיים</span>
Alternative 4
==============
But actually, consider this: The HTML document doesn't specify a
Western-language-group font, at all. And the document does not have DF setting
the typeface. So, why are we even setting "Nachlieli CLM", If we're not setting
"Liberation Serif", for example, for the LTR text? Why not just _drop the font
tag altogether_, as well as the p.ctl style?
--
You are receiving this mail because:
You are the assignee for the bug.