#15 change default word extraction for latex test

This commit is contained in:
Eliot Jones
2018-11-25 10:10:28 +00:00
parent 17909f8565
commit fdd48b25d8
3 changed files with 1999 additions and 1965 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -80,6 +80,7 @@
/// </summary>
/// <returns>The words on this page.</returns>
public IEnumerable<Word> GetWords() => GetWords(DefaultWordExtractor.Instance);
/// <summary>
/// Use a custom <see cref="IWordExtractor"/> to get the words for this page.
/// </summary>

View File

@@ -63,7 +63,7 @@
var gap = letter.Origin.X - (lastLetter.Origin.X + lastLetter.Width);
var nextToLeft = letter.Origin.X < lastX.Value - 1;
var nextBigSpace = gap > Math.Max(lastLetter.Width, letter.Width) * 0.9m;
var nextBigSpace = gap > Math.Max(lastLetter.GlyphRectangle.Height, letter.GlyphRectangle.Height) * 0.39m;
var nextIsWhiteSpace = string.IsNullOrWhiteSpace(letter.Value);
var nextFontDiffers = !string.Equals(letter.FontName, lastLetter.FontName, StringComparison.OrdinalIgnoreCase) && gap > letter.Width * 0.1m;
var nextFontSizeDiffers = Math.Abs(letter.FontSize - lastLetter.FontSize) > 0.1m;