Commit graph

529 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
b85d6a4f23
Use Vec::new instead of vec! macro 2023-04-21 20:56:11 +02:00
Héctor Ramón Jiménez
87d75531b7
Allow Shaping::Basic only if swash feature is enabled 2023-04-21 20:47:02 +02:00
Héctor Ramón Jiménez
0dce8b75d1
Fix examples 2023-04-21 20:35:59 +02:00
Héctor Ramón Jiménez
a5c548b12f
Fix syntect module 2023-04-21 20:29:56 +02:00
Héctor Ramón Jiménez
9e559e150d
Write docs for Shaping enum 2023-04-21 20:27:00 +02:00
Héctor Ramón Jiménez
0f055c0a13
Replace skip_shaping boolean with Shaping enum 2023-04-21 20:24:44 +02:00
Héctor Ramón Jiménez
ad111a1df1
Add skip_shaping flag to avoid expensive shaping when not needed 2023-04-19 00:24:43 +02:00
Jeremy Soller
bfb5eefbfa
Merge pull request #121 from CryZe/fixed-wasm-support
Fix WebAssembly support
2023-04-04 09:50:46 -06:00
Christopher Serr
a8546df7b3 Fix WebAssembly support
There was a problem in the upstream `sys-locale` crate where it assumed
that every WebAssembly target can use `wasm-bindgen` just fine. This
however is not the case, as `wasm-bindgen` and the ecosystem around it
are specifically to target the web. In reality there however are at
least the following 4 "targets" (with possibly more in the future):
 - WebAssembly on the web
 - Freestanding WebAssembly
 - WebAssembly with WASI
 - WebAssembly with Emscripten

These are all supported properly through `sys-locale` 0.3.0 now. However
because "WebAssembly on the web" unfortunately is not its own target and
instead uses `wasm32-unknown-unknown`, just like freestanding
WebAssembly, the only way to differentiate between them is through a
feature. This is the best practice and is done throughout the ecosystem.
Here the feature `wasm-web` is introduced that properly forwards it to
`sys-locale` and possibly other crates in the future.
2023-04-04 17:22:00 +02:00
Jeremy Soller
3224daa66f
0.8.0 2023-04-03 08:27:28 -06:00
Jeremy Soller
f2445987fb
Merge pull request #118 from pop-os/checked_sub
Use checked_sub to fix panic on window resize.
2023-03-31 06:43:30 -06:00
Jeremy Soller
615dc51907
Merge pull request #119 from CryZe/fix-no-std-signature
Fix `FontSystem::new_with_locale_and_db` Signature
2023-03-31 06:42:26 -06:00
13r0ck
e790e8e718 use checked_sub to fix panic on window resize.
bug link: https://github.com/iced-rs/iced/issues/1773
2023-03-30 12:40:14 -06:00
Christopher Serr
3b6373d0f4 Temporarily allow syn v1.0 in cargo deny
This temporarily allows `syn` v1.0 to be in the dependency tree as the
whole ecosystem is currently transitioning to `syn` v2.0. This process
however may take a while. The entry in the `deny.toml` should be removed
once all dependencies transitioned.
2023-03-30 20:11:45 +02:00
Jeremy Soller
3c7dc1f657
Remove monospaced from attrs 2023-03-30 08:04:52 -06:00
Christopher Serr
71281a5d79 Fix FontSystem::new_with_locale_and_db Signature
It turns out that the `no_std` version of
`FontSystem::new_with_locale_and_db` doesn't match the `std` version.
This fixes that.
2023-03-29 22:36:54 +02:00
Jeremy Soller
521acb64e0
Merge pull request #117 from CryZe/reuse-memory-in-set-text
Allow buffer reuse in `BufferLine`
2023-03-27 18:27:46 -06:00
Jeremy Soller
c8a7814974
Merge pull request #116 from CryZe/expose-rustybuzz
Expose `rustybuzz` in the public API
2023-03-27 18:26:42 -06:00
Christopher Serr
aff886da64 Allow buffer reuse in BufferLine
With the way `BufferLine::set_text` was written, you would always clone
the `String` / `str` that you are passing in, resulting in the function
almost not being any better than simply creating a new `BufferLine`.
This ensures the internal buffer is reused.
2023-03-27 23:14:40 +02:00
Christopher Serr
8a14734033 Expose rustybuzz in the public API
This exposes `rustybuzz` on top of `fontdb`. This is in particular
useful if you want to query the font for additional information. This is
already publically exposed via `Font::rustybuzz()`, but the types were
not re-exported, so it was impossible to properly use that function.
2023-03-27 23:08:32 +02:00
Jeremy Soller
6c355bf08b
Update libcosmic to fix memory leak 2023-03-24 09:59:03 -06:00
Jeremy Soller
3bb2868fbf
Update libcosmic 2023-03-24 08:05:46 -06:00
Jeremy Soller
d85f12af8b
Fix #106 with editor-libcosmic 2023-03-24 07:51:31 -06:00
Jeremy Soller
31a8427e10
Update libcosmic 2023-03-23 14:20:48 -06:00
Jeremy Soller
e788c175ec Merge branch 'geieredgar-example-deps' 2023-03-17 18:19:11 -06:00
Jeremy Soller
f101f5ca93 Merge branch 'example-deps' of https://github.com/geieredgar/cosmic-text into geieredgar-example-deps 2023-03-17 18:18:20 -06:00
Jeremy Soller
11be627086 Merge branch 'geieredgar-mut-font-system' 2023-03-17 18:16:56 -06:00
Jeremy Soller
9ebbc33792 Merge branch 'mut-font-system' of https://github.com/geieredgar/cosmic-text into geieredgar-mut-font-system 2023-03-17 18:15:45 -06:00
Jeremy Soller
be94a59eb8 Merge branch 'hojjatabdollahi-fix-layout-overflow' 2023-03-17 18:12:58 -06:00
Edgar Geier
d297a6a48a
Call get_font lazily 2023-03-14 00:39:50 +01:00
Hojjat
05b069911a Fix indices (suggestions by geieredgar) 2023-03-13 13:08:35 -06:00
Hojjat
01e609f3d6
Merge branch 'pop-os:main' into fix-layout-overflow 2023-03-13 11:40:42 -06:00
Hojjat
7fa51c6404 Fixed some typos 2023-03-13 08:50:24 -06:00
Edgar Geier
f86acd325c
Lazily call make_shared_face_data 2023-03-13 11:15:36 +01:00
Hojjat
8d503af956 bugfix: mixed ltr+rtl overflow 2023-03-12 21:37:10 -06:00
Edgar Geier
af4378d753
Add db_mut method to FontSystem 2023-03-12 10:39:58 +01:00
Edgar Geier
41468c17a2
Fix doctest 2023-03-12 10:39:58 +01:00
Edgar Geier
3331f41d7a
Improve documentation 2023-03-12 10:39:57 +01:00
Edgar Geier
384c5c1fdc
Remove Mutex from FontSystem 2023-03-12 10:39:56 +01:00
Edgar Geier
46e9ef0246
Make BorrowedWithFontSystem borrow FontSystem mutably 2023-03-12 10:39:56 +01:00
Edgar Geier
057b5b6fa9
Extract borrow of FontSystem from Buffer 2023-03-12 10:39:54 +01:00
Edgar Geier
bff5aaaea3
Make FontSystem not self-referencing 2023-03-12 10:23:54 +01:00
Jeremy Soller
c4a8d521f6 Add default Redox font directory (/ui/fonts) 2023-03-08 21:01:53 -07:00
Jeremy Soller
e43cc03354 Use std font system for redox 2023-03-08 20:44:26 -07:00
Edgar Geier
d59fd3f46b
Update example dependencies 2023-03-06 22:43:25 +01:00
Jeremy Soller
1bc198fd63
Merge pull request #94 from geieredgar/updates
Update `fontdb` and `rustybuzz` dependency
2023-03-05 06:49:16 -07:00
Jeremy Soller
28d8f5951b
Merge pull request #96 from geieredgar/clippy-fixes
Fix `f32` clippy warnings
2023-03-05 06:46:54 -07:00
Edgar Geier
17102f5144
Fix clippy warnings 2023-03-03 18:59:45 +01:00
Edgar Geier
81ecd49d40
Allow Zlib in dependencies 2023-03-03 13:21:42 +01:00
Edgar Geier
7e6368a4fc
Bump rustybuzz version to 0.7 2023-03-03 13:20:32 +01:00