Giter Site home page Giter Site logo

text style: underline about rio HOT 5 CLOSED

raphamorim avatar raphamorim commented on August 30, 2024
text style: underline

from rio.

Comments (5)

niuez avatar niuez commented on August 30, 2024

examples from other terminals. left is character underline, right is cursor underline. selection is to visualize glyph min and max y.

alacritty

  • character underline and cursor underline is same.
  • the bottoms of both underlines are same to the bottom of glyph.
image
  • character underline and cursor underline is not same y position.
  • the bottom of cursor underline is the same to the bottom of glyph.
  • the bottom of character underline is placed by underline position of font information.
image

the implementation of alacritty is easy. but using font information is strict.

from rio.

raphamorim avatar raphamorim commented on August 30, 2024

I like more Alacritty implementation (character underline and cursor underline is same), feels a bit off cursor style that specify underline do a different rendering that a normal text underline. What you think?

from rio.

niuez avatar niuez commented on August 30, 2024

I have never used underline cursor, so I wanted to hear from anyone with an opinion.
Appearance aside, I think Alacritty's method is easy if we want just implementing underline feature. It can be changed after.

from rio.

raphamorim avatar raphamorim commented on August 30, 2024

yup, we can start with alacritty's way and later revisit as well. Although might bump into this same type of problems alacritty/alacritty#3471 (if the cursor doesn't differentiate at least bit)

from rio.

raphamorim avatar raphamorim commented on August 30, 2024

Thinking about it, I don't believe we are able to do the second approach until rewrite the font loader. For now implemented Strikethrough and Underline using the sugardecoration but I think we can revisit it later once we have the font loader more stable (need to rewrite it due to #80 and WASM support).

Below some screenshots with underline and strikethrough using same approach as alacritty.

Screenshot 2023-06-05 at 08 56 22 Screenshot 2023-06-05 at 09 00 50 demo-text-styles

from rio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.