Glenn Watson
339a3f869b
Split Au type into separate crate, with minimal dependencies.
2015-10-01 07:16:11 +10:00
Glenn Watson
5684a75187
A few clean ups for Au type
2015-09-28 16:05:16 +10:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Manish Goregaokar
3c969b346a
Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev.
2015-09-23 14:44:59 +02:00
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
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
bors-servo
15de679f11
Auto merge of #7468 - JoshTheGoldfish:Issue7460, r=jdm
...
Making test-tidy check that = have space after them
For issue #7460 . Need to ensure compatibility with #7390 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7468 )
<!-- Reviewable:end -->
2015-09-01 08:33:02 -06:00
erneyja
17663315dd
make test-tidy check that = have space after them
2015-09-01 07:18:19 -04:00
Matt Brubeck
998bec30cf
Remove no-op Drop implementation from FontTable
...
This is no longer necessary for opting out of the Copy trait.
2015-08-28 10:43:04 -07:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Josh Matthews
8bb853f643
Fix existing syntactics nits.
2015-08-16 10:30:43 -04:00
Corey Farwell
df79c8f8fa
Utilize match guard; make methods more similar
...
Make the structure for the `stretchiness` and `boldness` methods more
similar
2015-08-11 18:28:50 -04:00
Patrick Walton
d6b9e3bdfd
gfx: Fix Core Text font instantiation for Web fonts on Mac.
...
Fixes GitHub Octicons. A reftest has been added for this.
2015-08-04 17:07:44 -07:00
Patrick Walton
e9ec9289d6
gfx: Instantiate the CTFont
corresponding to a Mac font on demand.
...
This avoids panics in multiprocess mode.
2015-07-31 08:42:30 -07:00
Huon Wilson
b42117fe0c
Avoid undefined behaviour by allocating with align 1.
...
The allocation APIs require that the alignment is a power-of-two;
meaning 1 is the "I don't care" alignment, not 0.
2015-07-30 10:49:42 -07:00
Patrick Walton
6eacb0c995
gfx: Make display lists serializable using serde
.
...
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.
This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Glenn Watson
f8eeef0eb4
Use atoms for font template structures.
2015-07-13 08:23:02 +10:00
Ms2ger
d6aa0915c3
Use the heap module through its facade in libstd.
2015-06-26 20:52:28 +02:00
Ms2ger
28086f3c75
Use Box::into_raw rather than boxed::into_raw.
...
The latter is deprecated.
2015-06-25 23:03:54 +02:00
Nicholas Nethercote
1553fada53
Instrument FreeType allocations.
...
This will allow reporting of memory usage by FreeType instances, which
are measured in the MiBs for LayoutWorker threads.
This change also makes FreeType allocations happen with jemalloc instead
of the system malloc, which is a good thing.
Finally, the change documents some dubiousness involving
FontContextHandle.
2015-06-10 15:48:19 -07:00
Corey Farwell
a9b0607bf1
Utilize if let
instead of match
in a few places
2015-06-09 21:15:38 -07:00
Corey Farwell
435e551753
Remove get_
prefix on getters
...
Part of #6224
I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
2015-06-02 08:54:44 -04:00
Nicholas Nethercote
e8fc406520
Reduce unsafe-ness in FontContextHandle::new().
...
Because `box + boxed::into_raw() + boxed::from_raw` is nicer than
`libc::malloc() + mem::transmute() + ptr::write() + libc::free()`.
2015-05-27 21:50:09 -07:00
Nicholas Nethercote
16ba32521b
Don't leak the struct_FT_MemoryRec_.
...
We libc::malloc() a struct_FT_MemoryRec_ and pass it to FreeType. We
need to libc::free() it as well when FreeType is done with it.
2015-05-27 21:22:11 -07:00
Jinwoo Song
557bb11bde
Use FT_Done_Library instead of FT_Done_Freetype
...
It is recommended to use FT_Done_Library with FT_New_Library
from freetype document.
Fixes #6191 .
2015-05-28 10:17:06 +09: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
Michael Wu
51503a2816
Avoid selecting bitmap fonts from fontconfig
2015-05-19 21:10:04 -04:00
Ms2ger
2bfca8f96f
Remove unused imports.
2015-05-06 19:20:10 +02: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
32d5e24922
Replace Au-related free functions in util::geometry with Au methods.
2015-05-05 17:36:03 +02:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00
Ms2ger
6a55ae06d7
Remove some as_slice calls.
2015-04-24 17:44:47 +02:00
Ms2ger
a8c7864c68
Stop using int in font_list.
2015-04-08 19:00:58 +02:00
Ms2ger
6ae74b6673
Pass the buffer to create_face_from_buffer.
...
It's better to hold on to the abstraction as long as possible.
2015-04-08 19:00:34 +02:00
Josh Matthews
a68fa74f4b
Remove int_uint feature from gfx.
2015-04-07 11:58:28 -04:00
Ms2ger
ba87666cdb
Update some code that's feature-gated under core.
2015-03-21 18:44:39 +01:00
Ms2ger
32d1e31c90
Replace most usage of std::old_io::File.
2015-03-20 23:47:29 +01:00
Simon Sapin
5ffd71cd5e
Fix some warnings in gfx.
2015-03-18 22:08:00 +01:00
Connor Jennings
f298089f02
Retain buffer for CGDataProviderCreateWithData. Fixes #5084 .
...
CGDataProviderCreateWithData just wraps the underlying buffer. The
underlying buffer needs to be kept around until the data provider is
freed. Adding the buffer to the FontTemplateData struct ensures it
sticks around.
2015-03-15 14:02:27 -04:00
Simon Sapin
d5dd1d658e
Upgrade to rustc ba2f13ef0 2015-02-04
2015-02-11 14:48:34 -08:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Patrick Walton
abddfa742f
gfx: Implement font-stretch
per CSS3-FONTS § 3.3 in the Core Text
...
font backend.
2015-01-28 12:42:52 -08:00
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
7eb659371d
Stop calling is_not_null.
...
It has been removed from Rust.
2015-01-20 13:08:49 +01:00
Matthew Rasmus
9881ecf8e2
Fix string::raw::from_buf
deprecation warning
2015-01-08 08:51:10 -08:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Ms2ger
d759b07299
Qualify libstyle enums.
2015-01-04 15:04:35 +01:00
Ms2ger
be5e9b4278
Remove some obsolete formatting traits.
2015-01-04 11:59:51 +01:00