Repository navigation
Support text runs. #251
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
Merged
Merged
Support text runs. #251
Changes from 4 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
4f9f992
Initial implementation
JimBobSquarePants b04fcaf
Merge branch 'main' into js/text-runs
JimBobSquarePants 2ceb25a
Fix bool assignment
JimBobSquarePants 2ef2353
Trim down to a max of two runs
JimBobSquarePants 65d8384
Ensure runs cannot overlap
JimBobSquarePants 7b74864
Validate run Start and End properties before slicing.
JimBobSquarePants a4a0e4d
Add some TextRun tests, simplify TextLayout
JimBobSquarePants 3796290
Assert Font is set
JimBobSquarePants e2b7bd5
Persist TextRun font sizes
JimBobSquarePants 3b62bab
Do groundwork for attribute support.
JimBobSquarePants 9283316
Fix tests build
JimBobSquarePants ac767a8
First pass at POST table
Redth f05c44e
Merge pull request #252 from Redth/main
JimBobSquarePants 9790ad6
Wire up post table
JimBobSquarePants afa057d
Add TODO: notes
JimBobSquarePants 45b5c9c
Superscript/Subscript scaling works.
JimBobSquarePants 7107da3
Scale and offset subscript + superscript
JimBobSquarePants 91916c7
Add TextRun available to GlyphRendererParameters
JimBobSquarePants 3439a98
Optimize scaled transform to a single call
JimBobSquarePants af80bc8
Restore good API
JimBobSquarePants a51f4fa
Render underlines/strikeout parts.
tocsoft c34b1c2
add attributes
tocsoft 74512e3
use better left hand side
tocsoft a1441e9
drop commented code
tocsoft 1eb941a
Merge pull request #254 from SixLabors/sw/text-run-lines
JimBobSquarePants f256682
Fix scaled line offset, lockdown glyph rendering, fix bidi tests
JimBobSquarePants f3de9c9
Fix null check and optimize
JimBobSquarePants 09654f9
better position underline/strikeout with better thinkness
tocsoft 953fb9b
Fix line and layout rendering of Arabic scripts.
JimBobSquarePants 5a09926
Merge branch 'js/text-runs' of https://github.com/SixLabors/Fonts int…
JimBobSquarePants 4b63c79
Update Program.cs
JimBobSquarePants 513d035
Fix overlong stroke
JimBobSquarePants a75eb02
Don't use rsb for fake advance measurements
JimBobSquarePants b002415
Always Ceil string measuring results.
JimBobSquarePants d30b285
Pixel perfect stroke. (Tested with drawing PR)
JimBobSquarePants 205cb94
Split TextDecoration and TextAttribute and add decoration renderer
tocsoft 9889bde
stylecoped
tocsoft 8360ce7
Offset overline to avoid clipping.
JimBobSquarePants 847c668
Fixed fix (ha!)
JimBobSquarePants 1303b7c
Add font metrics tests for new properties
JimBobSquarePants 5d8fdfe
Update enum names to match runtime standard
JimBobSquarePants 642999d
Fix horizontal variable font size line-height handling
JimBobSquarePants 41687c7
Fix initial vertical y offset
JimBobSquarePants ceb5656
Fix vertical layout + linebreak
JimBobSquarePants d7b4326
Update test to match fixes
JimBobSquarePants db51f98
Drop precision for .NET FX
JimBobSquarePants 6a883af
Fix line height
JimBobSquarePants a43a592
layout box is a fools errand. Leading FTW
JimBobSquarePants 39773e6
Use graphemes, fix line-gap usage, fix mixed line-height
JimBobSquarePants cfec9a5
Tweak adjusted advance ratio based on testing
JimBobSquarePants 6c3d00b
Fix font hinting
JimBobSquarePants 7b3ec08
Don't upscale already scaled ppem
JimBobSquarePants 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,39 @@ | ||
| // Copyright (c) Six Labors. | ||
| // Licensed under the Apache License, Version 2.0. | ||
|
|
||
| using System; | ||
|
|
||
| namespace SixLabors.Fonts | ||
| { | ||
| /// <summary> | ||
| /// Provides enumeration of various text attributes. | ||
| /// </summary> | ||
| [Flags] | ||
| public enum TextAttribute | ||
| { | ||
| /// <summary> | ||
| /// No attributes are applied | ||
| /// </summary> | ||
| None = 0, | ||
|
|
||
| /// <summary> | ||
| /// The text is underlined | ||
| /// </summary> | ||
| Underline = 1 << 0, | ||
|
|
||
| /// <summary> | ||
| /// The text contains a horizontal line through the center. | ||
| /// </summary> | ||
| Strikethrough = 1 << 1, | ||
|
|
||
| /// <summary> | ||
| /// The text set slightly below the normal line of type. | ||
| /// </summary> | ||
| Subscript = 1 << 2, | ||
|
|
||
| /// <summary> | ||
| /// The text set slightly above the normal line of type. | ||
| /// </summary> | ||
| Superscript = 1 << 3, | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.