-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kolaru compat with mathtexengine #1952
Merged
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
45485be
Use TeXChar common interface with FontExtent
Kolaru 57f03db
Uniformize char and texchar with GlyphExtent
Kolaru 283ab2f
Use TeXChar common interface with FontExtent
Kolaru e36aae3
Uniformize char and texchar with GlyphExtent
Kolaru 299176e
Merge branch 'compat_with_mathtexengine' of https://github.com/Kolaru…
Kolaru 1f4ccc3
Fix boundingbox for texchar
Kolaru c4c8f7b
Merge branch 'master' into compat_with_mathtexengine
ffreyer 799476d
fix line position
ffreyer 8f03716
fix @cell
ffreyer 8236a5a
fix word wrap
ffreyer cec9dae
fix text bounding boxes
ffreyer e63080d
switch to ink_bounding_box
ffreyer 13866bf
use character height instead of font height
ffreyer f9dfc09
tweak padding
ffreyer dbf59e2
Merge branch 'master' into compat_with_mathtexengine
SimonDanisch 1ee9347
Merge branch 'master' into compat_with_mathtexengine
SimonDanisch 6079966
Merge branch 'compat_with_mathtexengine' of https://github.com/Kolaru…
SimonDanisch cc84167
use height_insensitive_bb for chars
SimonDanisch 54de463
revert to inkboundingbox for ink_bb
jkrumbiegel 3859037
use height_insensitive_boundingbox_with_advance
jkrumbiegel 4228de7
remove dead code
jkrumbiegel 9580b87
improve test
jkrumbiegel dc8317b
use _with_advance everywhere
jkrumbiegel 6857bf6
remove false namespacing
jkrumbiegel f957e6f
correct ascender / descender use in alignment
jkrumbiegel a1a7391
revert paddings
jkrumbiegel 63abf38
Merge branch 'master' into Kolaru-compat_with_mathtexengine
jkrumbiegel 9862b3c
remove now invalid test
jkrumbiegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes bounding boxes less accurate. Why not undo my changes instead? (use character height instead of font height)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is that way on purpose. text should not be bounding-boxed tightly around the glyphs, but given the font's ascenders and descenders. unless there is a specific purpose for having a tighltly bounded glyph, but normal text is not that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the question is just if LaTeX should use something else because text is positioned all over the place there. I don't know how real LaTeX handles equation bounding boxes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok I guess I misunderstood, the ink_bb should of course be the inkboundingbox, but that doesn't mean we have to use it to compute text boundingboxes. it's still useful to have in that struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another direction I thought about going with my changes was to use something like
overallheight = max(font_height, max_height_of_line)
for latex. I guess that would be the way if we want to keep text aligned based on the largest character/font rather than individual characters.Maybe we should also just have both styles for alignments and bounding boxes. I.e. one based on characters and one based on the (if necessary padded) font (height)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally the font ascender / descenders shouldn't be that far off from normal strings that have the occasional f or g. Just some fonts define those metrics in a peculiar way (case in point, the need for TeX Gyre Heros Makie). So only if you were to do something where absolute precision of boundingboxes of strings was necessary would you need those other styles. I think in all other situations the non-jitteryness is preferable and seems to be what other text-based tools or browsers etc are doing.