Skip to content

Commit ff7eb73

Browse files
Move freetype binding to separate module. (#221)
This makes it more like the others, and will keep it cleaner when we go and bind the other functions in this module. A license header is also added to match what is being added to the rest of the files in another PR / commit.
1 parent 9699969 commit ff7eb73

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

harfbuzz-sys/src/freetype.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2023 The Servo Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution.
3+
//
4+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7+
// option. This file may not be copied, modified, or distributed
8+
// except according to those terms.
9+
10+
use crate::hb_font_t;
11+
12+
extern "C" {
13+
/// This requires that the `freetype` feature is enabled.
14+
pub fn hb_ft_font_create_referenced(face: freetype::freetype::FT_Face) -> *mut hb_font_t;
15+
}

harfbuzz-sys/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ pub mod coretext;
1818
pub mod directwrite;
1919

2020
#[cfg(feature = "freetype")]
21-
extern "C" {
22-
/// This requires that the `freetype` feature is enabled.
23-
pub fn hb_ft_font_create_referenced(face: freetype::freetype::FT_Face) -> *mut hb_font_t;
24-
}
21+
pub mod freetype;
2522

2623
#[allow(non_camel_case_types)]
2724
#[allow(non_snake_case)]

0 commit comments

Comments
 (0)