Skip to content
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

Continuous underline dotted #4684

Closed
wants to merge 5 commits into from

Conversation

tisilent
Copy link
Contributor

fix #4349
trial version
Font size above 26 is unstable.
Only processed webgl.
@Tyriar Is this idea feasible?

@tisilent
Copy link
Contributor Author

emmm, file format ...... 😭

@tisilent
Copy link
Contributor Author

tisilent commented Aug 18, 2023

企业微信截图_16923578967057
企业微信截图_16923578691709
This should be a reasonable situation.
size 21 , 22

@tisilent tisilent changed the title C ontinuous underline dotted Continuous underline dotted Aug 18, 2023
) {
if (cell.extended.underlineStyle === UnderlineStyle.DOTTED) {
const s = this._charSizeService.width;
variantOffset = ((deviceCellWidth! * chWidth) - variantOffset) % (lineWidth * 2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For dotted, I would expect there only to be up to 2 * dot_size variants. So when the dot size is 1px, these would be the 2 variants for s:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I also think so. The formula for calculating offset has not been written yet.

this._model.cells[i + RENDER_MODEL_BG_OFFSET] === this._cellColorResolver.result.bg &&
this._model.cells[i + RENDER_MODEL_FG_OFFSET] === this._cellColorResolver.result.fg &&
this._model.cells[i + RENDER_MODEL_EXT_OFFSET] === this._cellColorResolver.result.ext &&
this._model.cells[i + RENDER_MODEL_VARIANT_OFFSET] === variantOffset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH somehow lost my lengthy comment on this line 🙁

I think we can avoid the extra 32 bytes here by packing the variant type into the remaining 3 unused bytes (up to 8 variants) in the ext value. Moving it into CellColorResolver.resolve would also make sense as that already takes the cell and column and augments the fg and bg.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😨 I've sorted out the code and it's a bit messy. I've already figured out how to solve 2px+.

@tisilent
Copy link
Contributor Author

File formatting. I will restore it later. ....

@tisilent
Copy link
Contributor Author

??...... why.

@tisilent tisilent reopened this Aug 21, 2023
@tisilent
Copy link
Contributor Author

close,Resubmit. 😭.

@tisilent tisilent closed this Aug 21, 2023
@tisilent tisilent deleted the underline-dotted-backup branch November 9, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take column into account when rendering cells for perfect patterned underline rendering
2 participants