Skip to content

Commit e7dd01d

Browse files
committed
Make Font functions actually public.
1 parent 1633d87 commit e7dd01d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

raylib/src/core/text.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pub trait RaylibFont: AsRef<ffi::Font> + AsMut<ffi::Font> {
221221

222222
impl<'a, 'bind> Font<'bind, 'a> {
223223
/// Returns a new `Font` using provided `GlyphInfo` data and parameters.
224-
fn from_data(
224+
pub fn from_data(
225225
&'bind mut self,
226226
chars: &[ffi::GlyphInfo],
227227
base_size: i32,
@@ -252,7 +252,7 @@ impl<'a, 'bind> Font<'bind, 'a> {
252252
}
253253

254254
/// Sets the character data on the current Font.
255-
fn set_chars(&mut self, chars: &[ffi::GlyphInfo]) {
255+
pub fn set_chars(&mut self, chars: &[ffi::GlyphInfo]) {
256256
unsafe {
257257
self.glyphCount = chars.len() as i32;
258258
let data_size = self.glyphCount as usize * std::mem::size_of::<ffi::GlyphInfo>();
@@ -267,7 +267,7 @@ impl<'a, 'bind> Font<'bind, 'a> {
267267
}
268268

269269
/// Sets the texture on the current Font, and takes ownership of `tex`.
270-
fn set_texture(&mut self, tex: Texture2D) {
270+
pub fn set_texture(&mut self, tex: Texture2D) {
271271
self.texture = tex.0;
272272
std::mem::forget(tex); // UnloadFont will also unload the texture
273273
}

0 commit comments

Comments
 (0)