Skip to content

Commit

Permalink
FontStruct -> FontInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Apr 18, 2021
1 parent 714b1fe commit c533c8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/font.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ import { PetalumaMetrics } from './fonts/petaluma_metrics';
import { CustomFont } from './fonts/custom_glyphs';
import { CustomMetrics } from './fonts/custom_metrics';

export interface FontStruct {
size: number;
weight: string;
family: string;
style?: string;
font?: string;
face?: string;
point?: number;
}
export interface FontData {
glyphs: Record<string, FontGlyph>;
fontFamily?: string;
Expand Down
7 changes: 3 additions & 4 deletions src/stave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { Clef } from './clef';
import { KeySignature } from './keysignature';
import { TimeSignature } from './timesignature';
import { Volta } from './stavevolta';
import { FontStruct } from './font';
import { Bounds, Tempo, FactoryRendererOptions, FactoryStaveOptions } from './types/common';
import { Bounds, Tempo, FactoryRendererOptions, FactoryStaveOptions, FontInfo } from './types/common';
export interface StaveLineConfig {
visible: boolean;
}
Expand Down Expand Up @@ -44,7 +43,7 @@ export interface StaveOptions {
size?: string;
renderer?: FactoryRendererOptions;
stave?: FactoryStaveOptions;
font?: FontStruct;
font?: FontInfo;
autoStem?: boolean;
secondaryBeamBreaks?: never[];
direction?: number;
Expand Down Expand Up @@ -73,7 +72,7 @@ export class Stave extends Element {
protected formatted: boolean;
protected end_x: number;
protected measure: number;
protected font: FontStruct;
protected font: FontInfo;
protected bounds: Bounds;
protected readonly modifiers: StaveModifier[];

Expand Down
6 changes: 6 additions & 0 deletions src/types/common.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export interface FontInfo {
size: number;
weight: string;
family: string;
}

/** TODO: Move to Factory */
export interface FactoryStaveOptions {
space: number;
Expand Down

0 comments on commit c533c8b

Please sign in to comment.