musiqwik_font 0.0.2 copy "musiqwik_font: ^0.0.2" to clipboard
musiqwik_font: ^0.0.2 copied to clipboard

outdated

A flutter package for the MusiQwik font.

MusiQwik font package #

A flutter package redistributing the MusiQwik font.

The MusiQwik font is a music notation font that was created by Robert Allgeyer around 2001. This package redistributes the font under the conditions of the SIL Open Font License, with some added convenience utilities to simplify its use in flutter.

The font is good for creating simple music notation. However, it is not much good for creating complex music notation such as chords and beamed notes. Though you might be able to achieve something like that with stacking items on top of each other (but I didn't try that).

Getting started #

install the package

flutter pub add musiqwik_font

To use the font directly in a TextStyle, you can do the following:

Text(
  '=&=4Y=!==Y==Y==%F=G=X=!=%I=H=W===>V==:==.',
  style: TextStyle(
    fontFamily: 'MusiQwik',
    package: 'musiqwik_font',
    fontSize: 48,
  ),
),

produces:

Plain Text widget

Alternatively, you can use the MusiQwik static span() to return any named item as a TextSpan. This is useful if you want to use the font in a RichText widget.

RichText(
  text: TextSpan(
    children: <TextSpan>[
      MusiQwik.barStart.span(),
      MusiQwik.trebleClef.span(),
      MusiQwik.keyD.span(),
      MusiQwik.fourFourTime.span(),
      MusiQwik.trD4qrt.span(),
      MusiQwik.trE4qrt.span(),
      MusiQwik.trF4qrt.span(),
      MusiQwik.trG4qrt.span(),
      MusiQwik.barEnd.span(),
      MusiQwik.barStart.span(),
      MusiQwik.trA4qrt.span(),
      MusiQwik.trB4qrt.span(),
      MusiQwik.trC5qrt.span(),
      MusiQwik.trD5qrt.span(),
      MusiQwik.barEnd.span(),
    ],
  ),
)

Using utility TextSpans

use a custom font size;

return RichText(
  text: TextSpan(
    children: <TextSpan>[
      MusiQwik.barStart.span(_customFontSize),
      MusiQwik.fourFourTime.span(_customFontSize),
      MusiQwik.trD4qrt.span(_customFontSize),
      MusiQwik.trE4qrt.span(_customFontSize),
      MusiQwik.trF4qrt.span(_customFontSize),
      MusiQwik.trG4qrt.span(_customFontSize),
      MusiQwik.trD4qrt.span(_customFontSize),
      MusiQwik.trE4qrt.span(_customFontSize),
      MusiQwik.trF4qrt.span(_customFontSize),
      MusiQwik.trG4qrt.span(_customFontSize),
    ],
  ),
);

override font size

conventions for static names #

The names for the clefs and keys should be self-explanatory. The names for the notes are as follows:

  • trE4qrt: treble E 4th Octave quarter note
  • trCSharp4qrt: treble C# 4th Octave quarter note
  • baC4hlf: bass C 4th Octave half note

License #

The source code for the package is licensed under the MIT License.

Asset Licenses #

The package includes the [MusiQwik] font, which is distributed under the Open Font License (OFL). You can use, study, modify, and redistribute the font under the conditions of the OFL. For the complete terms and conditions, see the OFL License Text.

5
likes
0
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter package for the MusiQwik font.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on musiqwik_font