mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Move the workaround for Issue #163 next to the typedef.
This commit is contained in:
parent
ada1da1073
commit
2365a903b3
2 changed files with 10 additions and 2 deletions
|
@ -117,8 +117,7 @@ impl Font {
|
|||
None => {}
|
||||
}
|
||||
|
||||
// XXX(Issue #163): wrong! use typedef (as commented out)
|
||||
let shaper = @harfbuzz::shaper::HarfbuzzShaper::new(self);
|
||||
let shaper = @Shaper::new(self);
|
||||
self.shaper = Some(shaper);
|
||||
shaper
|
||||
}
|
||||
|
|
|
@ -4,5 +4,14 @@ Uniscribe, Pango, or Coretext.
|
|||
|
||||
Currently, only harfbuzz bindings are implemented.
|
||||
*/
|
||||
use font::Font;
|
||||
|
||||
pub type Shaper/& = harfbuzz::shaper::HarfbuzzShaper;
|
||||
|
||||
// TODO(Issue #163): this is a workaround for static methods and
|
||||
// typedefs not working well together. It should be removed.
|
||||
impl Shaper {
|
||||
static pub fn new(font: @Font) -> Shaper {
|
||||
harfbuzz::shaper::HarfbuzzShaper::new(font)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue