redox-os issueshttps://gitlab.redox-os.org/groups/redox-os/-/issues2018-06-13T17:19:47Zhttps://gitlab.redox-os.org/redox-os/rusttype/-/issues/25Update crates.io version2018-06-13T17:19:47ZJeremy SollerUpdate crates.io version*Created by: ozkriff*
ndarray 0.3 is not building on nightly rust: https://travis-ci.org/ozkriff/zoc/jobs/157466320 :(
*Created by: ozkriff*
ndarray 0.3 is not building on nightly rust: https://travis-ci.org/ozkriff/zoc/jobs/157466320 :(
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/7unreachable code panic2018-06-13T17:19:47ZJeremy Sollerunreachable code panic*Created by: Maxjen*
I ran into an unreachable code panic when trying to use the DejaVuSans font with RustType. It pointed me to [this line](https://github.com/dylanede/stb_truetype-rs/blob/master/src/lib.rs#L369) from stb_truetype-rs.
...*Created by: Maxjen*
I ran into an unreachable code panic when trying to use the DejaVuSans font with RustType. It pointed me to [this line](https://github.com/dylanede/stb_truetype-rs/blob/master/src/lib.rs#L369) from stb_truetype-rs.
Here is a slightly modified version of the example code to reproduce the panic:
[rusttype_test.zip](https://github.com/dylanede/rusttype/files/128893/rusttype_test.zip)
I also noticed that pair_kerning always returned 0.0 for all the glyph combinations I tried with the Gudea-Regular font. I was going to test if this was also the case with other fonts, but then I got the panic.
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/23Use docs.rs for documentation2018-06-13T17:19:47ZJeremy SollerUse docs.rs for documentation*Created by: ozkriff*
https://docs.rs/rusttype
*Created by: ozkriff*
https://docs.rs/rusttype
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/30Fonts crashing programs.2018-06-13T17:19:47ZJeremy SollerFonts crashing programs.*Created by: ghost*
https://github.com/PistonDevelopers/conrod/issues/874*Created by: ghost*
https://github.com/PistonDevelopers/conrod/issues/874https://gitlab.redox-os.org/redox-os/rusttype/-/issues/32Panics at FontCollection::into_font()2018-06-13T17:19:47ZJeremy SollerPanics at FontCollection::into_font()*Created by: Ploppz*
I created a FontCollection from a ttf file ([this](http://www.dafont.com/roboto.font) one, the regular version). I `clone()` it some times passing it to other structs, then finally when I need a font, e.g. when I wa...*Created by: Ploppz*
I created a FontCollection from a ttf file ([this](http://www.dafont.com/roboto.font) one, the regular version). I `clone()` it some times passing it to other structs, then finally when I need a font, e.g. when I want to create text geometry and do some caching, I call:
`let font = self.fonts.clone().into_font().unwrap();`
In seems like it crashes in `into_font() and here is the backtrace:
```
thread 'main' panicked at 'index 4 out of range for slice of length 0', ../src/libcore/slice.rs:560
stack backtrace:
1: 0x55c4d36cef7a - std::sys::imp::backtrace::tracing::imp::write::hbea47d9dd19b523c
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x55c4d36d16bf - std::panicking::default_hook::{{closure}}::h6875a2976258b020
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:247
3: 0x55c4d36d12be - std::panicking::default_hook::h88ffbc5922643264
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:263
4: 0x55c4d36d1b07 - std::panicking::rust_panic_with_hook::hc790e47d4ecc86cd
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:451
5: 0x55c4d36d1994 - std::panicking::begin_panic::hc066339e2fdc17d1
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:413
6: 0x55c4d36d18b9 - std::panicking::begin_panic_fmt::h5912b2d2df332044
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:397
7: 0x55c4d36d1847 - rust_begin_unwind
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:373
8: 0x55c4d3708d8d - core::panicking::panic_fmt::h561c5ee168a3d2cb
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/panicking.rs:69
9: 0x55c4d3708e69 - core::slice::slice_index_len_fail::hf63c0fc1cb19cea8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/slice.rs:560
10: 0x55c4d3437b37 - <core::ops::Range<usize> as core::slice::SliceIndex<T>>::index::hf2636759658374cd
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/slice.rs:691
11: 0x55c4d343746e - core::slice::<impl core::ops::Index<I> for [T]>::index::h71b0ac38ba650298
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/slice.rs:542
12: 0x55c4d3437e03 - stb_truetype::is_font::h391dfd7cef492e74
at /home/ploppz/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.0/src/lib.rs:158
13: 0x55c4d34343b8 - rusttype::FontCollection::into_font::h1006d63c62c3f89e
at /home/ploppz/.cargo/registry/src/github.com-1ecc6299db9ec823/rusttype-0.2.1/src/lib.rs:273
14: 0x55c4d3406c33 - renpdf::graphics::font_ren::FontRen::draw_text::hc78559ab494fbb97
at /home/ploppz/work/rust/renpdf/src/graphics/font_ren/mod.rs:78
15: 0x55c4d3407c9a - renpdf::graphics::PdfRenderer::new::he2c0ce9411ccb240
at /home/ploppz/work/rust/renpdf/src/graphics/mod.rs:29
16: 0x55c4d3408210 - renpdf::main::h40c610ece3667e1d
at /home/ploppz/work/rust/renpdf/src/main.rs:14
17: 0x55c4d36da53a - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libpanic_unwind/lib.rs:97
18: 0x55c4d36d234a - std::rt::lang_start::h5d71a3afaaa4b2ff
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:332
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:351
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/rt.rs:57
19: 0x55c4d3408912 - main
20: 0x7fbda7ba8290 - __libc_start_main
21: 0x55c4d333abf9 - _start
22: 0x0 - <unknown>
```https://gitlab.redox-os.org/redox-os/rusttype/-/issues/31Unclear in docs (to me) about font_id in Cache::rect_for2018-06-13T17:19:47ZJeremy SollerUnclear in docs (to me) about font_id in Cache::rect_for*Created by: Ploppz*
[Here](https://dylanede.github.io/rusttype/rusttype/gpu_cache/struct.Cache.html#method.rect_for) - what is `font_id` for? Is it used as an index into something? Connected with the PositionedGlyph? And where do I get...*Created by: Ploppz*
[Here](https://dylanede.github.io/rusttype/rusttype/gpu_cache/struct.Cache.html#method.rect_for) - what is `font_id` for? Is it used as an index into something? Connected with the PositionedGlyph? And where do I get it.
Sorry if this is not a real issue but not sure where to ask.https://gitlab.redox-os.org/redox-os/rusttype/-/issues/37Lowercase 'i' of Akashi font does not render correctly2018-06-13T17:19:47ZJeremy SollerLowercase 'i' of Akashi font does not render correctly*Created by: daboross*
I know nothing of the internals of truetype or font files, but I hope this could be a useful issue!
The font I'm using can be found at http://tenbytwenty.com/?xxxx_posts=akashi.
Here is a render with just th...*Created by: daboross*
I know nothing of the internals of truetype or font files, but I hope this could be a useful issue!
The font I'm using can be found at http://tenbytwenty.com/?xxxx_posts=akashi.
Here is a render with just the `simple.rs` code modified to load `Akashi.ttf` and render the string `"IIIII iiiii"`:
```text
.@@= x@% -@@: #@# :@@@@@@@@@@@: -@@# #@@- :@@x #@@. =@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@:..%@@#..=@@@:..%@@x..+@@@-.-@@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@@$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
.@@= x@% -@@: #@# :@@@@@@@@@@@$$$$@@$$$$$@@$$$$@@$$$$$@@$$$$@@@
:::=@@x:::#@%:::+@@+:::%@%:::+@@@@@@@@@@@$$$$@@@$$$$@@$$$$@@$$$$$@@$$$$@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
```
As you can see, the bottom part of the lowercase `i` is missing / rendered incorrectly.
Here's `Akashi.ttf` loaded into Gnome's Font Viewer (only thing I could think of to verify that the `i` is actually in the `ttf`):
![akashi-in-font-viewer](https://cloud.githubusercontent.com/assets/1152146/23890020/176aec76-084d-11e7-86e8-7d7e9d53a302.png)
Here's `Akashi.ttf` being used in the a `conrod` example, where I originally noticed this with the `i` in `Title`:
![akashi-in-conrod-example](https://cloud.githubusercontent.com/assets/1152146/23890036/37ef94b0-084d-11e7-81ce-158eeb4b61d3.png)
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/45Support unscaled fonts2018-06-13T17:19:47ZJeremy SollerSupport unscaled fonts*Created by: fschutt*
Currently, you cannot get a fonts ascender / descender without scaling the font. Freetype as a `FT_NO_SCALE`, which just gives you the raw metrics for the font. There is a Glyph::unscaled() thing, but it doesn't he...*Created by: fschutt*
Currently, you cannot get a fonts ascender / descender without scaling the font. Freetype as a `FT_NO_SCALE`, which just gives you the raw metrics for the font. There is a Glyph::unscaled() thing, but it doesn't help, really. The font itself has to be unscaled to get the ascender and descender correctly.
The function `Font::v_metrics(&self, scale: Scale) -> VMetrics` should accept a `NoScale` or similar as the `Scale` parameter.https://gitlab.redox-os.org/redox-os/rusttype/-/issues/44Get the postscript name of a font2018-06-13T17:19:47ZJeremy SollerGet the postscript name of a font*Created by: fschutt*
There is currently no way to get the postscript name of a font (i.e. "Roboto-Medium"). This is often very useful for identifying fonts. Is this currently planned?*Created by: fschutt*
There is currently no way to get the postscript name of a font (i.e. "Roboto-Medium"). This is often very useful for identifying fonts. Is this currently planned?https://gitlab.redox-os.org/redox-os/rusttype/-/issues/47Space character (0x0020) has no extents2018-06-13T17:19:47ZJeremy SollerSpace character (0x0020) has no extents*Created by: fschutt*
When trying to get the extents of the space character of any font (Unicode 0x0020, a literal "space"), the glyphs `extents` are `None`, which is wrong (`freetype-rs` shows a height of 2000 units, FontForge confirms...*Created by: fschutt*
When trying to get the extents of the space character of any font (Unicode 0x0020, a literal "space"), the glyphs `extents` are `None`, which is wrong (`freetype-rs` shows a height of 2000 units, FontForge confirms this). This makes it difficult to calculate the width of a space.
Seems to be a problem with `stb_truetype`. To reproduce:
```
let glyph = font.glyph(rusttype::CodepointOrGlyphId::Codepoint(rusttype::Codepoint(0x0020)));
let glyph_metrics = glyph.standalone().get_data().unwrap();
println!("{:?}", glyph_metrics.extents); // None - correct answer would be a Rect with a height of 2000
```https://gitlab.redox-os.org/redox-os/rusttype/-/issues/27Some fonts can cause rusttype to panic during Cache::cache_queued()2018-06-13T17:19:47ZJeremy SollerSome fonts can cause rusttype to panic during Cache::cache_queued()*Created by: Boscop*
I have a font called 'Bank Gothic Light.ttf' and when I try to render a string with it with Rusttype, I get this runtime error:
```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/
l...*Created by: Boscop*
I have a font called 'Bank Gothic Light.ttf' and when I try to render a string with it with Rusttype, I get this runtime error:
```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/
libcore\option.rs:323
stack backtrace:
0: 0x13c4448 - std::rt::lang_start::h14cbded5fe3cd915
1: 0x13c4cba - std::panicking::rust_panic_with_hook::hcd9d05f53fa0dafc
2: 0x13c4b56 - std::panicking::begin_panic_fmt::hb0a7126ee57cdd27
3: 0x13c4a0b - rust_begin_unwind
4: 0x11d8645 - rusttype::rasterizer::rasterize::{{closure}}<closure>
at C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\r
usttype-0.2.1\src\rasterizer.rs:199
5: 0x1147e9c - collections::slice::insertion_sort<(rusttype::geometry::Line,
rusttype::geometry::Rect<f32>),closure>
at C:\bot\slave\nightly-dist-rustc-win-msvc-32\build\src\libcoll
ections\slice.rs:1304
6: 0x1145902 - collections::slice::merge_sort<(rusttype::geometry::Line, rus
ttype::geometry::Rect<f32>),closure>
at C:\bot\slave\nightly-dist-rustc-win-msvc-32\build\src\libcoll
ections\slice.rs:1345
7: 0x114924a - collections::slice::{{impl}}::sort_by<(rusttype::geometry::Li
ne, rusttype::geometry::Rect<f32>),closure>
at C:\bot\slave\nightly-dist-rustc-win-msvc-32\build\src\libcoll
ections\slice.rs:1086
8: 0x11c5801 - rusttype::rasterizer::rasterize<closure>
at C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\r
usttype-0.2.1\src\rasterizer.rs:199
9: 0x11c904f - rusttype::PositionedGlyph::draw<closure>
at C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\r
usttype-0.2.1\src\lib.rs:764
10: 0x11cd278 - rusttype::gpu_cache::Cache::cache_queued<closure>
at C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\r
usttype-0.2.1\src\gpu_cache.rs:426
11: 0x1183961 - foo::font::MyFont::draw_string<glium::Frame>
at D:\projects\foo\src\font.rs:92
12: 0x11d7462 - basic::main
at D:\projects\foo\examples\basic.rs:154
13: 0x13c80fb - __rust_maybe_catch_panic
14: 0x13c3ec0 - std::rt::lang_start::h14cbded5fe3cd915
15: 0x11dd410 - main
16: 0x75c17c03 - BaseThreadInitThunk
17: 0x7758ad1e - RtlInitializeExceptionChain
```
This is the line where it happens:
https://github.com/dylanede/rusttype/blob/master/src/rasterizer.rs#L199
One of the values is NaN for some reason.
Is it possible that rusttype can give an error during loading of the font?
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/52Missing glyphs when using the gpu cache2018-06-13T17:19:47ZJeremy SollerMissing glyphs when using the gpu cache*Created by: alexheretic*
Hi I've recently developed [gfx_glyph](https://github.com/alexheretic/gfx-glyph) which uses this lovely library. I've noticed sometimes glyphs are be missing from the render, see below example of incorrect/corr...*Created by: alexheretic*
Hi I've recently developed [gfx_glyph](https://github.com/alexheretic/gfx-glyph) which uses this lovely library. I've noticed sometimes glyphs are be missing from the render, see below example of incorrect/correct render.
![missing-glyphs](https://user-images.githubusercontent.com/2331607/29562899-287fa14a-8733-11e7-86f2-83e868c7a77b.gif)
When using the PR code in #39 this issue does *not* occur. So that, or a similar, change would be great.
Fixed by #39.https://gitlab.redox-os.org/redox-os/rusttype/-/issues/48What is the status of the project?2018-06-13T17:19:47ZJeremy SollerWhat is the status of the project?*Created by: ozkriff*
@dylanede What are the current status and future plans of the project? Rusttype works fine right now, but it doesn't seem to be actively maintained for a long time.*Created by: ozkriff*
@dylanede What are the current status and future plans of the project? Rusttype works fine right now, but it doesn't seem to be actively maintained for a long time.https://gitlab.redox-os.org/redox-os/rusttype/-/issues/28Glyph artifacts when using glyph cache2018-06-13T17:19:47ZJeremy SollerGlyph artifacts when using glyph cache*Created by: Boscop*
When I render glyphs like in the gpu_cache example, I get artifacts like this:
![b08hgrg](https://cloud.githubusercontent.com/assets/535593/19415156/a0cfc19a-9367-11e6-8e7e-53c269a32c78.png)
It looks like it's caus...*Created by: Boscop*
When I render glyphs like in the gpu_cache example, I get artifacts like this:
![b08hgrg](https://cloud.githubusercontent.com/assets/535593/19415156/a0cfc19a-9367-11e6-8e7e-53c269a32c78.png)
It looks like it's caused by glyphs being tightly packed in the texture and OpenGL trying to interpolate because of `self.cache_tex.sampled().magnify_filter(glium::uniforms::MagnifySamplerFilter::Nearest)`.
But the problem persists when I change that to Linear.
Maybe it could be solved by leaving 1 pixel space between glyphs horizontally and vertically?
Or maybe there is a better solution by choosing a different way for OpenGL to access the texture data?
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/35Text artifacts when running on Ubuntu 16.042018-06-13T17:19:47ZJeremy SollerText artifacts when running on Ubuntu 16.04*Created by: johnthagen*
I've been developing a game with [Piston](http://www.piston.rs/) and decided to try it out on Ubuntu. So far there has been no problem with any of the text rendering on Windows or macOS, but on Ubuntu there are ...*Created by: johnthagen*
I've been developing a game with [Piston](http://www.piston.rs/) and decided to try it out on Ubuntu. So far there has been no problem with any of the text rendering on Windows or macOS, but on Ubuntu there are many problems with rendering.
<img width="515" alt="screen shot 2017-02-12 at 4 20 46 pm" src="https://cloud.githubusercontent.com/assets/10340167/22866152/55349996-f13f-11e6-8711-cc08bdc4eb97.png">
<img width="336" alt="screen shot 2017-02-12 at 4 22 20 pm" src="https://cloud.githubusercontent.com/assets/10340167/22866160/76518b84-f13f-11e6-9aaa-3225dbdf1f3d.png">
The source for the project with install instructions is here: https://github.com/johnthagen/rust-belt
Note: This was run from within a virtual machine using VMWare Fusion running on OSX.https://gitlab.redox-os.org/redox-os/rusttype/-/issues/26What does it mean when PositionedGlyph::draw call back give value of negative...2018-06-13T17:19:47ZJeremy SollerWhat does it mean when PositionedGlyph::draw call back give value of negative float?*Created by: bombless*
I tried a Chinese character "试" and the third argument of the call back gives some negative value like
```
-0.3671875
-0.3671875
-0.3671875
-0.50561523
-0.625
-0.01739502
-0.37109375
-0.37109375
```
I'm using a ...*Created by: bombless*
I tried a Chinese character "试" and the third argument of the call back gives some negative value like
```
-0.3671875
-0.3671875
-0.3671875
-0.50561523
-0.625
-0.01739502
-0.37109375
-0.37109375
```
I'm using a font file "simsunb.ttf" from Windows 10.
https://gitlab.redox-os.org/redox-os/rusttype/-/issues/55Consider transferring to a new maintainer2018-06-13T17:19:47ZJeremy SollerConsider transferring to a new maintainerThis library is a critical part of the Rust ecosystem, and has had a number of good PR's that have gone unreviewed and unmerged. The last update was September, 2016, *one year ago*.
There are several ways that this library can be main...This library is a critical part of the Rust ecosystem, and has had a number of good PR's that have gone unreviewed and unmerged. The last update was September, 2016, *one year ago*.
There are several ways that this library can be maintained for the future:
- Transfer repository and crates.io to Redox OS. We will take care of new development, issues, crate uploads, PR merges, and any other maintainer tasks
- Transfer to somebody else, who may do the same thing. Also give them the ability to upload new crates
- Add a new maintainer with Write or Admin permissions. You would maintain control, but the library would be able to continue developmenthttps://gitlab.redox-os.org/redox-os/rusttype/-/issues/33read font and output as either png or vec2018-06-13T17:19:47ZJeremy Sollerread font and output as either png or vec*Created by: kosinix*
Hello. Is it possible to read a font, set it to a specific font size and output it as a png? or a vec containing pixels of RGBA sequence?
The reason Im asking is i have a lib that edits images and I want to inco...*Created by: kosinix*
Hello. Is it possible to read a font, set it to a specific font size and output it as a png? or a vec containing pixels of RGBA sequence?
The reason Im asking is i have a lib that edits images and I want to incorporate writing texts on an image using rusttype. Is that possible? If so how to go about doing that?
(Sorry if its not a proper channel for this question but I cant find any way to contact the author.)https://gitlab.redox-os.org/redox-os/rusttype/-/issues/60Update changelog for 0.2.32018-06-13T17:19:46ZJeremy SollerUpdate changelog for 0.2.3https://gitlab.redox-os.org/redox-os/rusttype/-/issues/61A option to disable font anti-aliasing?2018-06-13T17:19:46ZJeremy SollerA option to disable font anti-aliasing?*Created by: expenses*
Anti-aliased fonts are fantastic, 99% of the time. But for some applications, generally games, unaliased fonts can preferred for aesthetic reasons. Do you think it would be possible to have an option to turn the f...*Created by: expenses*
Anti-aliased fonts are fantastic, 99% of the time. But for some applications, generally games, unaliased fonts can preferred for aesthetic reasons. Do you think it would be possible to have an option to turn the font antialiasing off?