mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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 => {}
|
None => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX(Issue #163): wrong! use typedef (as commented out)
|
let shaper = @Shaper::new(self);
|
||||||
let shaper = @harfbuzz::shaper::HarfbuzzShaper::new(self);
|
|
||||||
self.shaper = Some(shaper);
|
self.shaper = Some(shaper);
|
||||||
shaper
|
shaper
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,5 +4,14 @@ Uniscribe, Pango, or Coretext.
|
||||||
|
|
||||||
Currently, only harfbuzz bindings are implemented.
|
Currently, only harfbuzz bindings are implemented.
|
||||||
*/
|
*/
|
||||||
|
use font::Font;
|
||||||
|
|
||||||
pub type Shaper/& = harfbuzz::shaper::HarfbuzzShaper;
|
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