| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Fix ahem reftests on mac, by disabling text AA in reftest mode.
Also fix precision issues in font metrics to correct height
and baseline calculations.
|
|
|
|
| |
a hard-coded estimate.
|
| |
|
| |
|
|\
| |
| | |
Add basic support for web fonts. Synchronous loading only
|
| |
| |
| |
| |
| | |
separated format hints. Fix oversight in mac code dealing with
creating web fonts from memory.
|
| |
| |
| |
| |
| |
| | |
for now, and only deals with TTF format fonts.
For an example, try loading http://icons.marekventur.de
|
| | |
|
|/ |
|
|
|
|
| |
(#2554).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the font cache task, and adapts client code to use it. It also
cleans up some existing code paths.
- Fonts are only read once from disk while in use (they
are discarded if the reference count reaches zero, however).
This saves memory and prevents unnecessary reading from disk.
- It will be easier to add web font support, as all fonts
are created and managed in a single place and the entire
pipeline ensures that only one in-memory copy of font data
is required.
An overview of how the pieces fit together:
FontTemplate - A structure containing everything that
is required to create (and select) font handles. This
structure is shared among all matching font handles
(via Arc).
FontTemplateData - A platform specific structure that
contains the actual font data inside a template (this is
a byte array on Linux/Android, CTFont on Mac).
FontHandle - An opaque, platform specific handle to
a font instance. Each FontHandle contains an Arc<>
reference to the FontTemplate it was created from.
FontCache - This is a separate task, that is responsible
for loading and caching FontTemplate structures. There
is one FontCache per constellation. It is only ever accessed
via the FontContext described below.
FontContext - This is the public interface to the FontCache
and is used by the layout and render code to create font
handles. These must *not* be shared between threads. There
is typically one FontContext per thread/task.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
but don't do much on their own, they just make it easier to
implement the work to come (web fonts, performance improvments
in terms of font loading and memory usage).
- Font identifier on Linux/Android is now the font file path.
This is a temporary measure, but simplifies things a lot for now.
- Remove FontListHandleMethods trait in favour of free functions.
- FontList::refresh() has no knowledge of FontFamily etc. Instead it takes
a closure that the caller provides.
- FontList::load_variations_for_family no longer creates the font
handle. Instead it takes a closure and provides the name of the font
identifier for the variations it finds.
- Remove path_from_identifier() - it's no longer required.
- create_font_from_identifier() takes an Option<Style>, allowing it to be
used to create fonts for family matching purposes where the font size is
not important.
Tested on Linux + Mac. Builds on Android but not able to confirm it's working correctly.
|
|
|
|
| |
init to use allocator hooks.
|
| |
|
|\
| |
| | |
Remove unused code path - simplifies other refactoring.
|
| | |
|
|/
|
|
| |
profiling.
|
| |
|
|
|
|
| |
android building.
|
| |
|
| |
|
|
|
|
| |
This will allow us to use the GlyphIndex identifier to refer to glyph indexes into text runs in the future.
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
| |
The ~"string" expression is being removed in upstream rust.
|
|
|
|
|
|
| |
April 10, 2014. The main changes are to privacy, to work around the
issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the
various API changes strewn throughout the libraries.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
assign-heights phases.
This uses the new work-stealing deque. By default, 3/4 of a thread per
logical CPU is used. This can be tuned with the `-y` flag.
I measured a 65% reflow speedup on `perf-rainbow.html` and a 247% reflow
speedup on `http://en.wikipedia.org/wiki/South_China_Sea` on a 4-core
HyperThreaded Core i7. However, numbers were fairly volatile, especially
for the latter.
|
| |
|
|\
| |
| |
| |
| | |
* Using .connect(", ") just to use .split(",") later is silly. Keep it a vector.
* The 'font-style' property can not be both italic and oblique. Use an enum instead of two booleans.
|
| |
| |
| |
| |
| |
| |
| | |
* Using .connect(", ") just to use .split(",") later is silly.
Keep it a vector.
* The 'font-style' property can not be both italic and oblique.
Use an enum instead of two booleans.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
1. We've aimed to android 4.3 Jellybean devices like Galaxy 10.1 and Galaxy Nexus, etc. I think it could still support android 4.1
2. Needs android ndk r9(not r9b) and latest android sdk
3. Needs some device list update on sdk for apk build.
4. Currently we can not build android port on mac because compiler build problem like https://github.com/mozilla/rust/pull/10921. Hopefully I expect that it could be resolved at next rust upgrade.
|
| | |
|
| |
| |
| |
| | |
Add oblique style to pattern to find proper font.
|
|/
|
|
|
| |
Currently, hard coded value(FontWeight300) is used for font-weight property.
To display it properly, use parsed CSS font-weight value.
|
| |
|
| |
|
| |
|