mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Spaces in typewriter font never expand in justified text
This fixes on-screen appearance of things like code with lines longer than the window width. The TeXbook makes it clear by indicating that \fontdimen3 == 0 for these fonts.
This commit is contained in:
parent
f24bb4a919
commit
1d637b8af0
@ -45,7 +45,7 @@ static double const MAX_SPACE_STRETCH = 1.5; //em
|
|||||||
|
|
||||||
int Row::Element::countExpanders() const
|
int Row::Element::countExpanders() const
|
||||||
{
|
{
|
||||||
if (type != STRING)
|
if (type != STRING || font.fontInfo().family() == TYPEWRITER_FAMILY)
|
||||||
return 0;
|
return 0;
|
||||||
return support::countExpanders(str);
|
return support::countExpanders(str);
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ int Row::Element::countExpanders() const
|
|||||||
|
|
||||||
int Row::Element::expansionAmount() const
|
int Row::Element::expansionAmount() const
|
||||||
{
|
{
|
||||||
if (type != STRING)
|
if (type != STRING || font.fontInfo().family() == TYPEWRITER_FAMILY)
|
||||||
return 0;
|
return 0;
|
||||||
return countExpanders() * theFontMetrics(font).em();
|
return countExpanders() * theFontMetrics(font).em();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user