Giter Site home page Giter Site logo

Character names cut in italian about dim HOT 4 CLOSED

Theovorn avatar Theovorn commented on August 14, 2024
Character names cut in italian

from dim.

Comments (4)

bhollis avatar bhollis commented on August 14, 2024 1

Thanks for the research. Maybe for now we just need to bump the font size down to 18px for Italian.

from dim.

bhollis avatar bhollis commented on August 14, 2024

@liamdebeasi would you want to take a peek at this one? Adding the account-wide drop power definitely crowds out the vault label, but I wonder if we could use container queries or something to scale fonts to fit inside their space.

from dim.

liamdebeasi avatar liamdebeasi commented on August 14, 2024

Sure! I'll take a look and send over some ideas for how we can solve this.

from dim.

liamdebeasi avatar liamdebeasi commented on August 14, 2024

The text overflow here is a bit tricky due to the nameplate's sizing constraints. I don't know if we'll be able to devise a solution that ensures all characters are visible and legible while also keeping the nameplate dimensions the same.

You run into a couple potential issues by dynamically scaling the font size:

  1. Nameplates could have different class font sizes with longer class names having smaller font sizes (See image below). This could make the design look a bit inconsistent.

This could be somewhat mitigated by reducing the class font size by a fixed amount on each nameplate to maintain consistency.

  1. Really long class names could result in the text being so small it is no longer readable.

This could be somewhat mitigated by enforcing a minimum font size. Alternatively, if we instead reduced the class font size by a fixed amount then this would not be an issue.

CleanShot 2024-06-24 at 21 18 10


Changing the font size from 20px to 18px for the class text is a quick fix. You could also maybe change the width of the nameplates on desktop. However, this likely will not resolve the issue for all scenarios. Additionally, this will almost certainly become an issue again when implementing font scaling features.

A different user interface may be necessary to properly solve this problem. For example, the nameplate may need to be larger overall to allow for both longer and larger text. Rough idea of what that could look like:


Other options I explored that did not work for various reasons

Scale both width and height

In order to preserve the proportions of the nameplate while showing all the text we'd need to scale both the width and the height. While this would ensure all text was visible the result looks a bit odd. Additionally, this may cause issues on smaller screens (such as small mobile phones) where it would be possible for the nameplate to extend beyond the bounds of the screen. As a result, I don't recommend this approach.

CleanShot 2024-06-24 at 21 11 53


Wrap Text

Wrapping the text to the next line ensures that all the text is visible. However, the dimensions of the nameplate make this solution not practical. The class text would run into the player's title. We could change the height to accommodate, but then we run into the same problem as the previous approach.

CleanShot 2024-06-24 at 21 24 30


Just scaling the width

This runs into the same issue as above where it would be possible for the nameplate to extend beyond the bounds of the screen. Additionally, the background image would not span the full width of the nameplate.

CleanShot 2024-06-24 at 21 10 28

from dim.

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.