mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-24 17:09:41 +00:00
Since LyX uses "INHERIT" as a default, we do not want it for HTML.
Also reformat things. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31764 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
66fb89d976
commit
1d9b4956c3
@ -336,11 +336,25 @@ namespace {
|
|||||||
string getFamilyCSS(FontFamily const & f)
|
string getFamilyCSS(FontFamily const & f)
|
||||||
{
|
{
|
||||||
switch (f) {
|
switch (f) {
|
||||||
case ROMAN_FAMILY: return "serif";
|
case ROMAN_FAMILY:
|
||||||
case SANS_FAMILY: return "sans-serif";
|
return "serif";
|
||||||
case TYPEWRITER_FAMILY: return "monospace";
|
case SANS_FAMILY:
|
||||||
case INHERIT_FAMILY: return "inherit";
|
return "sans-serif";
|
||||||
default: break;
|
case TYPEWRITER_FAMILY:
|
||||||
|
return "monospace";
|
||||||
|
case SYMBOL_FAMILY:
|
||||||
|
case CMR_FAMILY:
|
||||||
|
case CMSY_FAMILY:
|
||||||
|
case CMM_FAMILY:
|
||||||
|
case CMEX_FAMILY:
|
||||||
|
case MSA_FAMILY:
|
||||||
|
case MSB_FAMILY:
|
||||||
|
case EUFRAK_FAMILY:
|
||||||
|
case WASY_FAMILY:
|
||||||
|
case ESINT_FAMILY:
|
||||||
|
case INHERIT_FAMILY:
|
||||||
|
case IGNORE_FAMILY:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -349,10 +363,13 @@ namespace {
|
|||||||
string getSeriesCSS(FontSeries const & s)
|
string getSeriesCSS(FontSeries const & s)
|
||||||
{
|
{
|
||||||
switch (s) {
|
switch (s) {
|
||||||
case MEDIUM_SERIES: return "normal";
|
case MEDIUM_SERIES:
|
||||||
case BOLD_SERIES: return "bold";
|
return "normal";
|
||||||
case INHERIT_SERIES: return "inherit";
|
case BOLD_SERIES:
|
||||||
default: break;
|
return "bold";
|
||||||
|
case INHERIT_SERIES:
|
||||||
|
case IGNORE_SERIES:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -367,8 +384,9 @@ namespace {
|
|||||||
case ITALIC_SHAPE: fs = "italic"; break;
|
case ITALIC_SHAPE: fs = "italic"; break;
|
||||||
case SLANTED_SHAPE: fs = "oblique"; break;
|
case SLANTED_SHAPE: fs = "oblique"; break;
|
||||||
case SMALLCAPS_SHAPE: fv = "small-caps"; break;
|
case SMALLCAPS_SHAPE: fv = "small-caps"; break;
|
||||||
case INHERIT_SHAPE: fs = "inherit"; fv = "inherit"; break;
|
case IGNORE_SHAPE:
|
||||||
case IGNORE_SHAPE: fs = ""; fv = ""; break;
|
case INHERIT_SHAPE:
|
||||||
|
fs = ""; fv = ""; break;
|
||||||
}
|
}
|
||||||
string retval;
|
string retval;
|
||||||
if (!fs.empty())
|
if (!fs.empty())
|
||||||
@ -382,22 +400,31 @@ namespace {
|
|||||||
string getSizeCSS(FontSize const & s)
|
string getSizeCSS(FontSize const & s)
|
||||||
{
|
{
|
||||||
switch (s) {
|
switch (s) {
|
||||||
case FONT_SIZE_TINY: return "xx-small";
|
case FONT_SIZE_TINY:
|
||||||
case FONT_SIZE_SCRIPT: return "x-small";
|
return "xx-small";
|
||||||
|
case FONT_SIZE_SCRIPT:
|
||||||
|
return "x-small";
|
||||||
case FONT_SIZE_FOOTNOTE:
|
case FONT_SIZE_FOOTNOTE:
|
||||||
case FONT_SIZE_SMALL: return "small";
|
case FONT_SIZE_SMALL:
|
||||||
case FONT_SIZE_NORMAL: return "medium";
|
return "small";
|
||||||
case FONT_SIZE_LARGE: return "large";
|
case FONT_SIZE_NORMAL:
|
||||||
|
return "medium";
|
||||||
|
case FONT_SIZE_LARGE:
|
||||||
|
return "large";
|
||||||
case FONT_SIZE_LARGER:
|
case FONT_SIZE_LARGER:
|
||||||
case FONT_SIZE_LARGEST: return "x-large";
|
case FONT_SIZE_LARGEST:
|
||||||
|
return "x-large";
|
||||||
case FONT_SIZE_HUGE:
|
case FONT_SIZE_HUGE:
|
||||||
case FONT_SIZE_HUGER: return "xx-large";
|
case FONT_SIZE_HUGER:
|
||||||
case FONT_SIZE_INCREASE: return "larger";
|
return "xx-large";
|
||||||
case FONT_SIZE_DECREASE: return "smaller";
|
case FONT_SIZE_INCREASE:
|
||||||
case FONT_SIZE_INHERIT: return "inherit";
|
return "larger";
|
||||||
case FONT_SIZE_IGNORE: return "";
|
case FONT_SIZE_DECREASE:
|
||||||
|
return "smaller";
|
||||||
|
case FONT_SIZE_IGNORE:
|
||||||
|
case FONT_SIZE_INHERIT:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// squash warning
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user