Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions Display/DotNETViewerComponent/DotNETView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -906,33 +906,36 @@ private IList<Quad> GetPageQuads(int pageNum)
bool letter = false;
Quad q = null;
IList<Quad> charQuads = word.CharQuads;
for (int i = 0; i < text.Length; ++i)
if (charQuads.Count == text.Length)
{
if (char.IsLetter(text, i) != letter)
{
if (q != null) quads.Add(q);
q = null;
letter = !letter;
}
if (q == null)
{
q = Utils.Clone(charQuads[i]);
}
else // check distance between quads - if we can concat them or not
for (int i = 0; i < text.Length; ++i)
{
const double interval = 0.5;
if (q.BottomRight.H + interval < charQuads[i].BottomLeft.H)
if (char.IsLetter(text, i) != letter)
{
if (q != null) quads.Add(q);
q = null;
letter = !letter;
}
if (q == null)
{
quads.Add(q);
q = Utils.Clone(charQuads[i]);
}
else
else // check distance between quads - if we can concat them or not
{
q = Concat(q, charQuads[i]);
const double interval = 0.5;
if (q.BottomRight.H + interval < charQuads[i].BottomLeft.H)
{
quads.Add(q);
q = Utils.Clone(charQuads[i]);
}
else
{
q = Concat(q, charQuads[i]);
}
}
}
}
if (q != null) quads.Add(q);
if (q != null) quads.Add(q);
}
}
if (quads.Count > 0) return quads;
Expand Down
Loading