Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ufo.rs to font.rs #140

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ufo.rs → src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ impl Default for MetaInfo {
}

impl Font {
/// Create a new `Ufo`.
/// Create a new, empty `Font` object.
pub fn new() -> Self {
Font::default()
}

/// Create a new `Ufo` only with certain fields
/// Create a new `Font` only with certain fields.
pub fn with_fields(data_request: DataRequest) -> Self {
let mut ufo = Self::new();
ufo.data_request = data_request;
Expand Down
3 changes: 2 additions & 1 deletion src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct LayerSet {
layers: Vec<Layer>,
}

#[allow(clippy::clippy::len_without_is_empty)] // never empty
#[allow(clippy::len_without_is_empty)] // never empty
impl LayerSet {
/// Load the layers from the provided path.
///
Expand Down Expand Up @@ -79,6 +79,7 @@ impl LayerSet {
/// The number of layers in the set.
///
/// This should be non-zero.
#[allow(clippy::len_without_is_empty)]
pub fn len(&self) -> usize {
self.layers.len()
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ extern crate serde_derive;
extern crate serde_repr;

pub mod error;
mod font;
pub mod fontinfo;
mod glyph;
mod guideline;
mod identifier;
mod layer;
mod names;
mod shared_types;
mod ufo;
mod upconversion;
pub mod util;

pub use error::Error;
pub use font::{DataRequest, Font, FormatVersion, MetaInfo};
pub use fontinfo::FontInfo;
pub use glyph::{
AffineTransform, Anchor, Component, Contour, ContourPoint, GlifVersion, Glyph, GlyphName,
Expand All @@ -43,7 +44,6 @@ pub use guideline::{Guideline, Line};
pub use identifier::Identifier;
pub use layer::{Layer, LayerSet};
pub use shared_types::{Color, IntegerOrFloat, NonNegativeIntegerOrFloat, Plist};
pub use ufo::{DataRequest, Font, FormatVersion, MetaInfo};

#[allow(deprecated)]
pub use ufo::Ufo;
pub use font::Ufo;
4 changes: 2 additions & 2 deletions src/upconversion.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::collections::{BTreeMap, HashMap, HashSet};
use std::path::Path;

use crate::font::{Groups, Kerning};
use crate::fontinfo::FontInfo;
use crate::names::NameList;
use crate::shared_types::IntegerOrFloat;
use crate::ufo::{Groups, Kerning};
use crate::Error;

/// Convert kerning groups and pairs from v1 and v2 informal conventions to
Expand Down Expand Up @@ -216,8 +216,8 @@ mod tests {
extern crate maplit;

use super::*;
use crate::font::{Font, FormatVersion};
use crate::glyph::GlyphName;
use crate::ufo::{Font, FormatVersion};
use maplit::btreemap;

#[test]
Expand Down