Giter Club home page Giter Club logo

Comments (9)

indiv0 avatar indiv0 commented on July 20, 2024

Slightly off-topic, but does the aliasing on the fonts look a bit weird to you?.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Yeah i've noticed that occasionally when playing around with the example, not quite sure what to do about it, doesn't seem to be majorly noticeable / disruptive though. If anyone wants to work it out, it's using freetype to render a glyph bitmap, a rust-graphic's Texture is made from the bitmap, both then get cached in the UIContext and rendered by rust-graphics' Context::image(&texture) in whatever widget fn uses it.

from conrod.

indiv0 avatar indiv0 commented on July 20, 2024

Perhaps its a font hinting issue? Does Dense-Regular.otf support hinting?

Here's a side-by-side comparison of Arial and Dense-Regular:

Arial renders fine.

Or maybe I'm just seeing things.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Yeah agreed, Arial looks much "cleaner" in that example.

re font hinting, I'm not sure! I haven't had a lot of experience with font rendering - Dense-Regular.otf was the first font I came across that I liked aesthetically when looking through a "top 100 free fonts" list haha.

If hinting is the issue, I really wouldn't mind if it was swapped out for a different default font that does support hinting, though it would be nice to find something modern/minimal/sleek if we do 👍

I was thinking of changing UIContext::new() to take a font name as a string, so a user can just add whatever font they want to the assets folder and then type it in on the highest level i.e. something like UIContext::new(Font("Arial.ttf")) / UIContext::new(DefaultFont) so hopefully there shouldn't be too much of an issue in the end.

from conrod.

indiv0 avatar indiv0 commented on July 20, 2024

I'm a fan of Inconsolata, but that's more for programming (and it looks a bit less crisp than Arial):

It's under OFL license though, so that's nice.

Maybe something from The League of Movable Type?
Like junction?

As for changing UIContext::new(), I'd be in favor of a change like that.
It would certainly clean up font loading clutter on higher-levels.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Maybe it's worth opening a "Choose a Default Font" issue and getting some ideas together there?

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

I've got a big PR coming tonight with a new widget and some other smaller changes, I'll change the UIContext::new() signature while i'm at it 👍

from conrod.

indiv0 avatar indiv0 commented on July 20, 2024

Would that be a issue for Piston or Conrod?
I think it'd be a good idea for Piston to choose a font, and use that to represent the whole project (e.g. in the logo).

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

Here is an updated screenshot:

screenshot

from conrod.

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.