Simon Sapin
a205c82264
Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)
2017-07-27 02:21:01 +02:00
Manish Goregaokar
2230332f46
Update app_units to 0.4.1
2017-05-19 20:33:02 -07:00
Simon Sapin
02e1901bc1
Upgrade to rustc 1.19.0-nightly (ced823e26 2017-05-07)
2017-05-08 12:46:03 +02:00
Julien Levesy
b78979d692
replace match by if let statements if possible
2016-12-31 12:34:05 +01:00
UK992
93a103ba73
Reorder use
statements
2016-09-09 04:55:19 +02:00
Ravi Shankar
a04028eede
Prefer length and percentage for word spacing
2016-08-09 17:53:40 +05:30
Ms2ger
db5ddb561c
Reduce the scope of the allowed unsafe code in gfx::text.
2016-06-05 12:31:55 +02:00
Cullen Rhodes
40acd24e8f
Report use statements that use {} with only one entry
2016-05-27 10:18:44 +01:00
Matt Brubeck
43e12f7eba
Don't create HarfBuzz shaper if it isn't used
...
Move the fast shaping code out of the HarfBuzz shaper, and initialize the
shaper lazily to avoid creating any HarfBuzz objects.
2016-05-23 11:46:16 -07:00
Matt Brubeck
7bf6a41553
Remove unused FontShapingOptions field from Shaper
2016-05-23 11:26:39 -07:00
Matt Brubeck
5991afafa4
Add a fast path for shaping ASCII text
2016-05-20 16:47:01 -07:00
Matt Brubeck
7f6b1da85c
Allow creation of unboxed FontTables
2016-05-19 09:44:56 -07:00
Matt Brubeck
0010b448b8
Move hb_tag! macro and KERN into font module
2016-05-19 09:44:56 -07:00
Matt Brubeck
1eab6fbb2e
Simplify FontTableMethods::with_buffer
2016-05-19 09:44:56 -07:00
Per Lundberg
2f7ed1d73e
Removed unused imports
...
This fixes #11185 .
2016-05-15 22:24:26 +03:00
Matt Brubeck
659305fe0a
Use byte indices instead of char indices for text runs
...
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking. This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
Matt Brubeck
dba878dfb2
Remove unneeded add_nonglyph_for_char_index
...
This is a no-op, since a "non-glyph" is simply `GlyphEntry(0)`. This is the
same as `GlyphEntry::initial()`, which all the entries are already initialized
to.
2016-04-28 08:07:13 -07:00
Matt Brubeck
97a58e9689
Don't assume the first glyph is part of the first char
...
Shaper::save_glyph_results incorrectly starts its loop by setting glyph_span
to a length of 1. This means that the `if glyph_span.len() == 0` test in the
inner loop will never succeed.
Instead the glyph span should start out empty, and a glyph should be added only
as the corresponding char is found. For comparison, see the Gecko code this
was ported from:
https://hg.mozilla.org/mozilla-central/file/ab0044bf/gfx/thebes/gfxHarfBuzzShaper.cpp#l1682
2016-04-28 07:59:42 -07:00
Matt Brubeck
4d05bf23b8
Get rid of unnecessary clamping in text shaping
2016-04-27 10:58:16 -07:00
Matt Brubeck
83feda3ac2
Stop using deprecated str::char_*
methods
...
Fixes deprecation warnings in the gfx crate.
2016-04-27 10:57:11 -07:00
Matt Brubeck
7e67bb788c
Replace range::Range with std::ops::Range in text shaping code
2016-04-27 10:17:21 -07:00
Zbynek Winkler
924d804583
Move '&&' to the end of the previous line.
...
Following https://github.com/servo/servo/issues/10692 this is just a
formating change to satisfy a new tidy requirement of not having '&&' at
the beginning of a line.
2016-04-22 14:28:18 +02:00
Jonathan Schuster
205336bf2e
Move util::range into its own crate
2016-02-25 21:06:10 -05:00
Olaf Buddenhagen
c5ede5851e
Derive Debug on FontGroup and its components
2015-12-12 10:04:33 +01:00
bors-servo
ac448cacba
Auto merge of #7799 - mbrubeck:glyph-cleanup, r=pcwalton
...
Misc. code cleanup in gfx::text::glyph.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7799 )
<!-- Reviewable:end -->
2015-09-30 17:44:02 -06:00
Glenn Watson
339a3f869b
Split Au type into separate crate, with minimal dependencies.
2015-10-01 07:16:11 +10:00
Matt Brubeck
d3d1d15615
Remove unused is_missing flag
2015-09-30 09:45:24 -07:00
Matt Brubeck
e663005ce2
Simplify add_glyph_for_char_index
2015-09-30 09:36:01 -07:00
Matt Brubeck
569b434023
Fix shaping of tab characters with Harfbuzz 1.0
...
Harfbuzz now renders tabs with a "missing character" glyph by default, so we
need to filter them out ourselves after computing an advance.
2015-09-29 14:34:51 -07:00
Matt Brubeck
371e6897e1
Break text runs by unicode script
2015-09-29 14:34:49 -07:00
Matt Brubeck
062493fac6
Upgrade to the new harfbuzz-sys crate
2015-09-29 14:34:48 -07:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Patrick Walton
53f47e74db
gfx: Remove some useless calls to drop
during HarfBuzz shaping.
2015-09-17 13:31:14 +02:00
Patrick Walton
dc26511ff3
gfx: Properly create continuation glyph entries for ligatures.
2015-09-17 13:31:09 +02:00
Mathieu Rheaume
7320433cca
Remove 'get_*' on getters as per RFC 0344 on various components
2015-09-12 20:14:01 -04:00
Matt Brubeck
afafb0b71c
Implement get_table_for_tag on FreeType
...
Also fixes use-after-free of FontTable buffers.
2015-09-03 13:35:44 -07:00
wilmoz
64ac4f175f
Make test-tidy check that braces have spaces before or after them
2015-08-31 12:30:55 -05:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Josh Matthews
039929da5c
Warning police.
...
Closes #6949 .
2015-08-04 15:16:15 +02:00
bors-servo
d77f9415c5
Auto merge of #6937 - mbrubeck:hb_funcs, r=glennw
...
Store Harfbuzz callback functions in a static var
r? gw
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6937 )
<!-- Reviewable:end -->
2015-08-03 22:40:35 -06:00
Matt Brubeck
47a0d494ec
Make Harfbuzz font_funcs static
2015-08-03 15:30:46 -07:00
Matt Brubeck
f8e92b2b01
Implement the unicode-bidi property
2015-08-03 14:12:33 -07:00
Matt Brubeck
dfac8ce4a1
Basic support for bidirectional text
2015-07-23 20:05:55 -07:00
Ms2ger
ce4d442941
Move away from the repeat().take().collect() pattern.
...
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
ecoal95
8cbfb3482c
Use euclid from crates.io
2015-06-19 00:04:24 +02:00
Corey Farwell
5c408d2be9
rust-geom API changes
...
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Simon Sapin
8b522f2e7d
Rename Au methods with f32/f64 instead of frac32/frac/subpx
2015-05-05 18:23:29 +02:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00