-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insert a space when TJ string is offset by more than a threshold
That threshold is hard-coded as -100 (is this font specific?)
- Loading branch information
1 parent
bdf676e
commit 30ff60a
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package contentstream | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestOperandTJSpacing(t *testing.T) { | ||
|
||
content := `BT | ||
[(are)-328(h)5(ypothesized)-328(to)-327(in\003uence)-328(the)-328(stability)-328(of)-328(the)-328(upstream)-327(glaciers,)-328(and)-328(thus)-328(of)-328(the)-328(entire)-327(ice)-328(sheet)]TJ | ||
ET` | ||
referenceText := "are hypothesized to in\003uence the stability of the upstream glaciers, and thus of the entire ice sheet" | ||
|
||
cStreamParser := NewContentStreamParser(content) | ||
|
||
text, err := cStreamParser.ExtractText() | ||
if err != nil { | ||
t.Error() | ||
} | ||
|
||
if text != referenceText { | ||
t.Fail() | ||
} | ||
|
||
} |