Skip to content
Snippets Groups Projects
Commit e81002b8 authored by StarArawn's avatar StarArawn
Browse files

Fixed most of the warnings.

parent be183faa
No related branches found
No related tags found
No related merge requests found
use bevy::{
prelude::{
AddAsset, AssetEvent, AssetServer, Assets, Commands, EventReader, Handle, Local, Plugin,
Res, ResMut,
},
prelude::{Plugin, Res, ResMut},
render2::{
render_asset::RenderAssets,
render_resource::{FilterMode, TextureFormat, TextureUsages},
renderer::{RenderDevice, RenderQueue},
texture::Image,
RenderApp, RenderStage,
},
utils::HashSet,
};
use kayak_font::{FontTextureCache, KayakFont, KayakFontPlugin};
use kayak_font::{FontTextureCache, KayakFontPlugin};
mod extract;
mod font_mapping;
......
......@@ -7,7 +7,6 @@ use bevy::{
use bevy_kayak_ui::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle};
use kayak_components::{Button, Text, Window};
use kayak_core::{
context::KayakContext,
styles::{Style, StyleProp, Units},
EventType, Index, OnEvent,
};
......
......@@ -7,7 +7,6 @@ use bevy::{
use bevy_kayak_ui::{BevyContext, BevyKayakUIPlugin, FontMapping, ImageManager, UICameraBundle};
use kayak_components::{NinePatch, Text};
use kayak_core::{
context::KayakContext,
layout_cache::Space,
styles::{LayoutType, Style, StyleProp, Units},
widget, Children, EventType, Index, OnEvent,
......
......@@ -7,7 +7,6 @@ use kayak_font::{KayakFont, KayakFontPlugin};
fn startup(mut commands: Commands, asset_server: Res<AssetServer>) {
let font_handle: Handle<KayakFont> = asset_server.load("roboto.kayak_font");
dbg!(font_handle);
}
......
use std::{collections::HashMap, path::PathBuf};
use std::collections::HashMap;
use bevy::{
asset::{AssetLoader, AssetPath, BoxedFuture, LoadContext, LoadedAsset},
......
......@@ -12,7 +12,6 @@ use bevy::{
},
render2::{
render_resource::{FilterMode, TextureFormat, TextureUsages},
renderer::{RenderDevice, RenderQueue},
texture::Image,
RenderApp, RenderStage,
},
......
......@@ -7,12 +7,11 @@ use bevy::{
render_resource::{
AddressMode, BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayout,
BindingResource, CommandEncoderDescriptor, Extent3d, FilterMode, ImageCopyTexture,
ImageDataLayout, Origin3d, SamplerDescriptor, TextureAspect, TextureDescriptor,
TextureDimension, TextureFormat, TextureUsages, TextureViewDescriptor,
TextureViewDimension,
Origin3d, SamplerDescriptor, TextureAspect, TextureDescriptor, TextureDimension,
TextureFormat, TextureUsages, TextureViewDescriptor, TextureViewDimension,
},
renderer::{RenderDevice, RenderQueue},
texture::{GpuImage, Image, TextureFormatPixelInfo},
texture::{GpuImage, Image},
},
utils::HashMap,
};
......
use crate::{atlas::Atlas, glyph::Glyph, metrics::Metrics, SDFType};
use crate::{atlas::Atlas, glyph::Glyph, metrics::Metrics};
use bevy::math::Vec2;
use serde::Deserialize;
......@@ -68,6 +68,7 @@ impl Sdf {
#[test]
fn test_sdf_loader() {
use crate::SDFType;
let sdf = Sdf::from_string(include_str!("../assets/roboto.kayak_font").to_string());
assert!(sdf.max_glyph_size() == Vec2::new(30.0, 36.0));
assert!(sdf.atlas.width == 212);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment