Skip to content

Commit

Permalink
fix: ttf in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
simbleau committed May 21, 2024
1 parent 3229a44 commit e83b435
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions examples/z_ordering/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn main() {
),
);
embedded_asset!(app, "assets/google_fonts/squid.json");
embedded_asset!(app, "assets/fonts/Rubik-Medium.vttf");
embedded_asset!(app, "assets/fonts/Rubik-Medium.ttf");
app.run();
}

Expand All @@ -36,7 +36,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
// Show assets
let mut row = |label: &str, y: f32, zfn: ZFunction| {
commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Right,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand All @@ -53,7 +53,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
});

commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Bottom,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand All @@ -69,7 +69,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
..default()
});
commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Bottom,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand All @@ -85,7 +85,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
..default()
});
commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Bottom,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand All @@ -101,7 +101,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
..default()
});
commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Bottom,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand All @@ -117,7 +117,7 @@ fn setup_worldspace_vectors(mut commands: Commands, asset_server: ResMut<AssetSe
..default()
});
commands.spawn(VelloTextBundle {
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.vttf"),
font: asset_server.load("embedded://z_ordering/assets/fonts/Rubik-Medium.ttf"),
alignment: VelloTextAlignment::Bottom,
coordinate_space: CoordinateSpace::WorldSpace,
text: VelloText {
Expand Down
2 changes: 1 addition & 1 deletion src/text/font_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ impl AssetLoader for VelloFontLoader {
}

fn extensions(&self) -> &[&str] {
&["vttf"]
&["ttf"]
}
}

0 comments on commit e83b435

Please sign in to comment.