/trunk/Scribus/scribus/pageitem_pathtext.cpp |
---|
309,6 → 309,15 |
GlyphRun run(&itemRenderText.charStyle(a), itemRenderText.flags(a), a, a, itemRenderText.object(a)); |
run.glyphs().append(glyphs); |
const StyleFlag& effects = itemRenderText.charStyle(a).effects(); |
if (effects & ScStyle_UnderlineWords) |
{ |
if (itemRenderText.text(a).isSpace()) |
run.clearFlag(ScLayout_Underlined); |
else |
run.setFlag(ScLayout_Underlined); |
} |
const CharStyle& cStyle(run.style()); |
double scaleV = cStyle.scaleV() / 1000.0; |
double offset = (cStyle.fontSize() / 10) * (cStyle.baselineOffset() / 1000.0); |
/trunk/Scribus/scribus/pageitem_textframe.cpp |
---|
1465,15 → 1465,13 |
PageItem* currentObject = itemText.object(a); |
bool HasMark = itemText.hasMark(a); |
if (itemText.charStyle(a).effects() & ScStyle_UnderlineWords) |
const StyleFlag& effects = itemText.charStyle(a).effects(); |
if (effects & ScStyle_UnderlineWords) |
{ |
CharStyle tmp(itemText.charStyle(a)); |
StyleFlag effects = tmp.effects(); |
if (!itemText.text(a).isSpace()) |
effects |= ScStyle_Underline; |
effects &= ~ScStyle_UnderlineWords; |
tmp.setFeatures(effects.featureList()); |
itemText.applyCharStyle(a, 1, tmp); |
if (itemText.text(a).isSpace()) |
glyphRuns[i].clearFlag(ScLayout_Underlined); |
else |
glyphRuns[i].setFlag(ScLayout_Underlined); |
} |
if (HasMark) |
/trunk/Scribus/scribus/sctextstruct.h |
---|
44,11 → 44,12 |
ScLayout_ExpandingSpace= 4, // new: marks an expanding space |
ScLayout_ImplicitSpace = 8, // new: marks an implicit space |
ScLayout_TabLeaders = 16, // new: marks a tab with fillchar |
ScLayout_HyphenationPossible=128, //Hyphenation possible here (Soft Hyphen) |
ScLayout_HyphenationPossible=128, // Hyphenation possible here (Soft Hyphen) |
ScLayout_DropCap = 2048, |
ScLayout_SuppressSpace = 4096, //internal use in PageItem (Suppresses spaces when in Block alignment) |
ScLayout_SoftHyphenVisible=8192, //Soft Hyphen visible at line end |
ScLayout_StartOfLine = 16384 //set for start of line |
ScLayout_SuppressSpace = 4096, // internal use in PageItem (Suppresses spaces when in Block alignment) |
ScLayout_SoftHyphenVisible=8192, // Soft Hyphen visible at line end |
ScLayout_StartOfLine = 16384, // set for start of line |
ScLayout_Underlined = 32768 // chararcter should be underlined |
}; |
/trunk/Scribus/scribus/styles/charstyle.h |
---|
145,7 → 145,7 |
QString asString() const; |
/** This property will be evaluated at runtime and is not stored. See 'updateFeatures()' */ |
const StyleFlag effects() const { validate(); return m_Effects; } |
const StyleFlag& effects() const { validate(); return m_Effects; } |
void setEffects(StyleFlag flags) { m_Effects = flags; } |
/trunk/Scribus/scribus/text/boxes.cpp |
---|
503,7 → 503,8 |
// Do underlining first so you can get typographically correct |
// underlines when drawing a white outline |
if (m_effects & ScStyle_Underline && hasStrokeColor) |
bool isUnderlined = ((m_effects & ScStyle_Underline) || m_glyphRun.hasFlag(ScLayout_Underlined)); |
if (isUnderlined && hasStrokeColor) |
{ |
double st, lw; |
if ((charStyle.underlineOffset() != -1) || (charStyle.underlineWidth() != -1)) |