Commit graph

11 commits

Author SHA1 Message Date
Emil Ernerfeldt
ade41403b5 refactor fonts: do all text layout via the Fonts struct 2021-03-29 21:12:11 +02:00
Emil Ernerfeldt
46425f1e38 Optimize: add #[inline(always)] to various low-level things
saves up to 20% (text tesselation), and at least 5% overall
2021-03-28 23:16:19 +02:00
Emil Ernerfeldt
cbe6faa83b Render tab character (\t) as four spaces 2021-03-23 20:06:52 +01:00
Emil Ernerfeldt
1c415bd8fe Add benchmark for text layout and tesselation 2021-02-08 22:53:31 +01:00
Emil Ernerfeldt
8189a78284 Improve text wrapping related to first line indentation and logograms 2021-02-06 15:19:04 +01:00
Emil Ernerfeldt
91ce18d62f Widgets will now always line break at \n characters 2021-02-06 14:50:03 +01:00
Emil Ernerfeldt
7336df53b7 Tweak line spacing for new paragraphs 2021-01-31 16:42:54 +01:00
Emil Ernerfeldt
b647592a5a Wrap text at dashes, punctuations or anywhere if necessary
Closes https://github.com/emilk/egui/issues/55

Supersedes https://github.com/emilk/egui/pull/104
2021-01-31 15:57:19 +01:00
Emil Ernerfeldt
96fb0771a2 Fix text layout bug: empty text would lack first row indentation 2021-01-27 20:17:16 +01:00
n2
449192e5fb
Text wrap correctly on Chinese chraracter (#104)
* Text wrap correctly on Chinese chrarcter

* Text wrap correctly on Chinese chraracter, checked by a stand-alone function
2021-01-12 10:15:51 +01:00
Emil Ernerfeldt
26d576f510 Break out mod paint into new crate epaint 2021-01-10 15:42:46 +01:00
Renamed from egui/src/paint/text/font.rs (Browse further)