These are chat archives for rust-lang/rust

Oct 2018
Mallory M.
Oct 07 2018 16:56
Hi all, I usually don't work on this type of thing, so I'm totally lost on where to start. I need to generate a png (or image w/transparent background). The image will just be a list of names in a specific font. Is there a repo or some other resource that someone could point me to in order to begin figuring this out?
Michal 'vorner' Vaner
Oct 07 2018 16:58
@malzzz I have no experience with it, but the first place I'd go looking is probably this:
Or generate some kind of metapost or postfix and find something to render it.
Oct 07 2018 17:03
@malzzz rusttype crate can render fonts, png crate can encode bitmaps. If you are willing to write bunch of glue code.
Mallory M.
Oct 07 2018 17:12
@vorner @red75prime Okay, great. I'll look into those. Thanks!
Oct 07 2018 18:59
greetings - is there something from the std lib similar to lrint
Oct 07 2018 19:09
No, it seems too x87 specific. There's though
Stateful model of floating point computations hasn't aged well
Oct 07 2018 19:15
Okay I quickly glanced at and decided to just quickly implement it for my needs..
Rotem Yaari
Oct 07 2018 19:49
Clippy claims that in fn format_error<'a>(e: &'a Error) -> Cow<'a, str> {..., explicit lifetimes can be elided... Does anybody know how? To the best of my knowledge Cow requires a lifetime parameter...
Denis Lisov
Oct 07 2018 21:50