Skip to content

Commit 03a8b2c

Browse files
committed
created a crate
1 parent 128d541 commit 03a8b2c

File tree

7 files changed

+33
-30
lines changed

7 files changed

+33
-30
lines changed

Cargo.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
2-
name = "fontmanager"
2+
name = "gosub_fontmanager"
33
version = "0.1.0"
44
edition = "2021"
5+
authors = ["Gosub Community <info@gosub.io>"]
6+
description = "Generic font manager"
7+
license = "MIT"
58

69
[[bin]]
710
name = "display-fonts"

src/bin/display-fonts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use prettytable::{Attr, Cell, Row, Table};
2-
use fontmanager::{FontManager, FontSourceType};
2+
use gosub_fontmanager::{FontManager, FontSourceType};
33

44
fn main() {
55
colog::init();

src/bin/generate-svg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use fontmanager::{FontManager, FontSourceType, FontStyle};
1+
use gosub_fontmanager::{FontManager, FontSourceType, FontStyle};
22
// const TEST_STRING1: &str = "A B C D E\n \u{EA84} a b c d e";
33

44
const TEST_STRING: &str = r"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

src/bin/gtk-test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use gtk4::{glib, Application, ApplicationWindow, DrawingArea};
22
use gtk4::prelude::{ApplicationExt, ApplicationExtManual, DrawingAreaExt, DrawingAreaExtManual, GtkWindowExt, WidgetExt};
33
use pangocairo::functions::{create_layout, show_layout};
44
use pangocairo::pango;
5-
use fontmanager::{FontManager, FontSourceType, FontStyle};
5+
use gosub_fontmanager::{FontManager, FontSourceType, FontStyle};
66

77
const APP_ID: &str = "io.gosub.font-manager.gtk-test";
88

@@ -53,7 +53,7 @@ fn build_ui(app: &Application) {
5353
let desc = pango.get_description(&fi_comic, 14.0);
5454
layout.set_font_description(Some(&desc));
5555

56-
layout.set_text(fontmanager::flatland::TEXT);
56+
layout.set_text(gosub_fontmanager::flatland::TEXT);
5757
layout.set_width(width * pango::SCALE);
5858
layout.set_alignment(pango::Alignment::Center);
5959

src/bin/gtk2-test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use image::Rgba;
44
use parley::layout::{Alignment, Layout, PositionedLayoutItem};
55
use parley::style::{FontWeight, StyleProperty};
66
use parley::{InlineBox, LayoutContext};
7-
use fontmanager::{FontInfo, FontManager, FontSourceType, FontStyle};
7+
use gosub_fontmanager::{FontInfo, FontManager, FontSourceType, FontStyle};
88

99
const RENDER_GLYPHS_PER_RUN : bool = false;
1010

@@ -51,7 +51,7 @@ fn build_ui(app: &Application) {
5151

5252
// let text = "Some text here. Let's make it a bit longer so that line wrapping kicks in 😊. And also some اللغة العربية arabic text.\nThis is underline and strikethrough text";
5353
// let text = "hello world. This is a test to see if it works! abcdefghhijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456790";
54-
let text = fontmanager::flatland::TEXT;
54+
let text = gosub_fontmanager::flatland::TEXT;
5555

5656
let area = DrawingArea::default();
5757
area.set_hexpand(true);

src/bin/parley.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use swash::scale::{Render, ScaleContext, Scaler, Source, StrikeWith};
99
use swash::zeno;
1010
use swash::FontRef;
1111
use zeno::{Format, Vector};
12-
use fontmanager::{FontManager, FontSourceType, FontStyle};
12+
use gosub_fontmanager::{FontManager, FontSourceType, FontStyle};
1313

1414
#[derive(Clone, Copy, Debug, PartialEq)]
1515
struct ColorBrush {

0 commit comments

Comments
 (0)