view release on metacpan or search on metacpan
lib/ChordPro/Config/Data.pm view on Meta::CPAN
use JSON::Relaxed::Parser qw();
use feature qw(state);
# Config version.
our $VERSION = 6.081;
sub config {
state $pp = JSON::XS->new->utf8
->boolean_values( $JSON::Boolean::false, $JSON::Boolean::true );
$pp->decode( <<'EndOfJSON' );
{"$schema":"https://chordpro.org/beta/resources/config.schema","a2crd":{"classifier":"pct_chords","infer-titles":true,"tabstop":"8"},"assets":{},"chord-formats":{"common":"%{root|%{}%{qual|%{}}%{ext|%{}}%{bass|/%{}}|%{name}}","nashville":"%{root|%{}%...
EndOfJSON
}
1;
lib/ChordPro/Output/HTML.pm view on Meta::CPAN
$res .= "<span id=\"".$fragment->{label}."\"/>";
next;
}
next unless length($fragment->{text});
my $f = $fragment->{font} || $self->{_currentfont};
my @c; # styles
my @d; # decorations
if ( $f->{style} eq "italic" ) {
push( @c, q{font-style:italic} );
}
if ( $f->{weight} eq "bold" ) {
push( @c, q{font-weight:bold} );
}
if ( $fragment->{color} && $fragment->{color} ne $self->{_currentcolor} ) {
push( @c, join(":","color",$fragment->{color}) );
}
if ( $fragment->{size} && $fragment->{size} ne $self->{_currentsize} ) {
push( @c, join(":","font-size",$fragment->{size}) );
}
if ( $fragment->{bgcolor} ) {
push( @c, join(":","background-color",$fragment->{bgcolor}) );
}
lib/ChordPro/Wx/SettingsDialog.wxg view on Meta::CPAN
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM|wxEXPAND</flag>
<object class="wxStaticText" name="l_instrument" base="EditStaticText">
<font>
<size>11</size>
<family>default</family>
<style>normal</style>
<weight>bold</weight>
<underlined>0</underlined>
<face />
</font>
<label>Instrument</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM|wxEXPAND</flag>
lib/ChordPro/Wx/SettingsDialog.wxg view on Meta::CPAN
</object>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM|wxEXPAND</flag>
<object class="wxStaticText" name="l_style" base="EditStaticText">
<font>
<size>11</size>
<family>default</family>
<style>normal</style>
<weight>bold</weight>
<underlined>0</underlined>
<face />
</font>
<label>Style</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM|wxEXPAND</flag>
lib/ChordPro/Wx/SettingsDialog.wxg view on Meta::CPAN
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM</flag>
<object class="wxStaticText" name="l_stylemods" base="EditStaticText">
<font>
<size>11</size>
<family>default</family>
<style>normal</style>
<weight>bold</weight>
<underlined>0</underlined>
<face />
</font>
<label>Style Modifiers</label>
<attribute>1</attribute>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<border>0</border>
lib/ChordPro/Wx/SettingsDialog.wxg view on Meta::CPAN
<attribute>1</attribute>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxBOTTOM|wxEXPAND</flag>
<object class="wxStaticText" name="l_spacer" base="EditStaticText">
<font>
<size>11</size>
<family>default</family>
<style>normal</style>
<weight>bold</weight>
<underlined>0</underlined>
<face />
</font>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<border>10</border>
<flag>wxBOTTOM|wxEXPAND</flag>
<object class="wxStaticText" name="l_stylemods_desc" base="EditStaticText">
lib/ChordPro/lib/SVGPDF/CSS.pm view on Meta::CPAN
# Split font shorthand.
if ( $s eq "font" ) {
use Text::ParseWords qw(shellwords);
my @spec = shellwords($s{$s});
foreach my $spec ( @spec ) {
$spec =~ s/;$//;
if ( $spec =~ /^([.\d]+)px/ ) {
$s{'font-size'} = $1;
}
elsif ( $spec eq "bold" ) {
$s{'font-weight'} = "bold";
}
elsif ( $spec eq "italic" ) {
$s{'font-style'} = "italic";
}
elsif ( $spec eq "bolditalic" ) {
$s{'font-weight'} = "bold";
$s{'font-style'} = "italic";
}
elsif ( $spec =~ /^(?:text,)?serif$/i ) {
$s{'font-family'} = "serif";
}
elsif ( $spec =~ /^(?:text,)?sans(?:-serif)?$/i ) {
$s{'font-family'} = "sans";
}
# These are for ABC SVG processing.
lib/ChordPro/lib/SVGPDF/FontManager.pm view on Meta::CPAN
}
}
# No @font-face, no (or failed) callbacks, we're on our own.
my $fn = $style->{'font-family'} // "Times-Roman";
my $sz = $style->{'font-size'} || 12;
my $em = $style->{'font-style'}
&& $style->{'font-style'} =~ /^(italic|oblique)$/ || '';
my $bd = $style->{'font-weight'}
&& $style->{'font-weight'} =~ /^(bold|black)$/ || '';
for ( ffsplit($fn) ) {
$fn = lc($_);
# helvetica sans sans-serif text,sans-serif
if ( $fn =~ /^(sans|helvetica|(?:text,)?sans-serif)$/ ) {
$fn = $bd
? $em ? "Helvetica-BoldOblique" : "Helvetica-Bold"
: $em ? "Helvetica-Oblique" : "Helvetica";
}
lib/ChordPro/lib/SVGPDF/FontManager.pm view on Meta::CPAN
# Nothing found...
$fn = $bd
? $em ? "Times-BoldItalic" : "Times-Bold"
: $em ? "Times-Italic" : "Times-Roman";
}
my $font = $fc->{$fn} //= do {
unless ( $fn =~ /\.\w+$/ ) {
my $t = "";
$t .= "italic, " if $em;
$t .= "bold, " if $bd;
$t = " (" . substr($t, 0, length($t)-2) . ")" if $t;
warn("SVG: Font ", $style->{'font-family'}//"<none>",
"$t - falling back to built-in font $fn with limited glyphs!\n")
}
{ font => $svg->pdf->font($fn), src => $fn };
};
return ( $font->{font}, $sz, $font->{src} );
}
sub ffsplit ( $family ) {
lib/ChordPro/res/abc/abc2svg/abc2svg-1.js view on Meta::CPAN
// reference:
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
abc2svg.ft_w = {
thin: 100,
extralight: 200,
light: 300,
regular: 400,
medium: 500,
semi: 600,
demi: 600,
semibold: 600,
demibold: 600,
bold: 700,
extrabold: 800,
ultrabold: 800,
black: 900,
heavy: 900
}
abc2svg.ft_re = new RegExp('\
-?Thin|-?Extra Light|-?Light|-?Regular|-?Medium|\
-?[DS]emi|-?[DS]emi[ -]?Bold|\
-?Bold|-?Extra[ -]?Bold|-?Ultra[ -]?Bold|-?Black|-?Heavy/',
"i")
// lyric prefix
lib/ChordPro/res/abc/abc2svg/abc2svg-1.js view on Meta::CPAN
49.4, 64.2, 83.5, 108.5]),
staffsep: 46,
stemheight: 21, // one octave
stretchlast: .25,
stretchstaff: true,
subtitlefont: {name: txt_ff, size: 16},
subtitlespace: 3,
sysstaffsep: 34,
systnames: -1, // (for compatibility)
systvoices: 3,
tempofont: {name: txt_ff, weight: "bold", size: 12},
textfont: {name: txt_ff, size: 16},
// textoption: undefined,
textspace: 14,
tieheight: 1.0,
titlefont: {name: txt_ff, size: 20},
// titleleft: false,
titlespace: 6,
titletrim: true,
// transp: 0, // global transpose
// topmargin: .7 * IN,
topspace: 22,
tuplets: [0, 0, 0, 0],
tupletfont: {name: txt_ff, style: "italic", size: 10},
vocalfont: {name: txt_ff, weight: "bold", size: 13},
vocalspace: 10,
voicefont: {name: txt_ff, weight: "bold", size: 13},
// voicescale: 1,
writefields: "CMOPQsTWw",
wordsfont: {name: txt_ff, size: 16},
wordsspace: 5,
"writeout-accidentals": "n"
}
// parameters that are used in the symbols
var sfmt = {
bardef: true,
lib/ChordPro/res/abc/abc2svg/abc2svg-1.js view on Meta::CPAN
var deco_str_style = {
crdc: { // cresc., decresc., dim., ...
dx: 0,
dy: 5,
style: 'font:italic 14px text,serif',
anchor: ' text-anchor="middle"'
},
dacs: { // long repeats (da capo, fine...)
dx: 0,
dy: 3,
style: 'font:bold 15px text,serif',
anchor: ' text-anchor="middle"'
},
pf: {
dx: 0,
dy: 5,
style: 'font:italic bold 16px text,serif',
anchor: ' text-anchor="middle"'
}
}
deco_str_style.at = deco_str_style.crdc
function out_deco_str(x, y, de) {
var name = de.dd.glyph // class
if (name == 'fng') {
out_XYAB('\
lib/ChordPro/res/abc/abc2svg/abc2svg-1.js view on Meta::CPAN
if (!defl.noen)
xygl(x + val + 6, y, "pedoff")
}
function out_8va(x, y, val, defl) {
if (val < 18) {
val = 18
x -= 4
}
if (!defl.nost) {
out_XYAB('<text x="X" y="Y" \
style="font:italic bold 12px text,serif">8\
<tspan dy="-4" style="font-size:10px">va</tspan></text>\n',
x - 8, y);
x += 12;
val -= 12
}
y += 6;
out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhF"/>\n',
x, y, val)
if (!defl.noen)
out_XYAB('<path class="stroke" d="mX Yv6"/>\n', x + val, y)
}
function out_8vb(x, y, val, defl) {
if (val < 18) {
val = 18
x -= 4
}
if (!defl.nost) {
out_XYAB('<text x="X" y="Y" \
style="font:italic bold 12px text,serif">8\
<tspan dy=".5" style="font-size:10px">vb</tspan></text>\n',
x - 8, y);
x += 10
val -= 10
}
// y -= 2;
out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhF"/>\n',
x, y, val)
if (!defl.noen)
out_XYAB('<path class="stroke" d="mX Yv-6"/>\n', x + val, y)
}
function out_15ma(x, y, val, defl) {
if (val < 25) {
val = 25
x -= 6
}
if (!defl.nost) {
out_XYAB('<text x="X" y="Y" \
style="font:italic bold 12px text,serif">15\
<tspan dy="-4" style="font-size:10px">ma</tspan></text>\n',
x - 10, y);
x += 20;
val -= 20
}
y += 6;
out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhF"/>\n',
x, y, val)
if (!defl.noen)
out_XYAB('<path class="stroke" d="mX Yv6"/>\n', x + val, y)
}
function out_15mb(x, y, val, defl) {
if (val < 24) {
val = 24
x -= 5
}
if (!defl.nost) {
out_XYAB('<text x="X" y="Y" \
style="font:italic bold 12px text,serif">15\
<tspan dy=".5" style="font-size:10px">mb</tspan></text>\n',
x - 10, y);
x += 18
val -= 18
}
// y -= 2;
out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhF"/>\n',
x, y, val)
if (!defl.noen)
out_XYAB('<path class="stroke" d="mX Yv-6"/>\n', x + val, y)
lib/ChordPro/res/abc/abc2svg/grid-1.js view on Meta::CPAN
abc.out_svg('"/>\n')
// show the repeat signs and the parts
y = -1 + font.size * .7
x = x0
for (i = 0; i < bars.length; i++) {
bar = bars[i]
if (bar[0] == ':') {
abc.out_svg('<text class="' + cls + '" x="')
abc.out_sxsy(x - 5, '" y="', y)
abc.out_svg('" style="font-weight:bold;font-size:' +
(font.size * 1.5).toFixed(1) + 'px">:</text>\n')
}
if (i == 0
|| (grid.repbrk
&& (bar.slice(-1) == ':' || bar[0] == ':'))
|| parts[i]
|| k >= nc) {
y -= hr; // new row
x = x0
k = 0
if (parts[i]) {
w = abc.strwh(parts[i])[0]
abc.out_svg('<text class="' + cls + '" x="')
abc.out_sxsy(x - 2 - w, '" y="', y)
abc.out_svg('" style="font-weight:bold">' +
parts[i] + '</text>\n')
}
}
k++
if (bar.slice(-1) == ':') {
abc.out_svg('<text class="' + cls + '" x="')
abc.out_sxsy(x + 5, '" y="', y)
abc.out_svg('" style="font-weight:bold;font-size:' +
(font.size * 1.5).toFixed(1) + 'px">:</text>\n')
}
x += wmx
}
abc.vskip(hr * (nr + 1) + 6)
} // build_grid()
// ----- block_gen() -----
var p_voice, n, font, f2
lib/ChordPro/res/abc/abc2svg/grid3-1.js view on Meta::CPAN
x = x0
y += hr
while (1) {
bar = bl.shift()
if (!bar)
break
if (bar[0] == ':')
line += '<text class="' + cls + '" x="' +
(x - 5).toFixed(1) +
'" y="' + y.toFixed(1) +
'" style="font-weight:bold;font-size:' +
(font.size * 1.6).toFixed(1) +
'px">:</text>\n'
if (bar.slice(-1) == ':')
line += '<text class="' + cls + '" x="' +
(x + 5).toFixed(1) +
'" y="' + y.toFixed(1) +
'" style="font-weight:bold;font-size:' +
(font.size * 1.6).toFixed(1) +
'px">:</text>\n'
x += wc
}
}
abc.out_svg(line)
abc.vskip(hr * nr + 6)
} // build_grid()
// ----- block_gen ----
lib/ChordPro/res/abc/abc2svg/psvg-1.js view on Meta::CPAN
var name = gcur.font_n
if (!name)
return
var prop = "",
i = name.indexOf("Italic"),
j = 100,
o = name.indexOf("Oblique"),
b = name.indexOf("Bold"),
flags = 0
if (b > 0) {
prop = ' font-weight="bold"';
j = b;
flags = 2
}
if (i > 0 || o > 0) {
if (i > 0) {
prop += ' font-style="italic"';
if (i < j)
j = i;
flags |= 4
}
lib/ChordPro/res/abc/abc2svg/strtab-1.js view on Meta::CPAN
}
a.push("clef=") // set the clef
g = this.get_glyphs()
if (tab.length == 3) {
a.push('"tab3"')
if (!g.tab3)
// SMuFL: -none-
g.tab3 = '<text id="tab3"\
x="-2,-2,-2" y="-4,3,10"\
style="font:bold 8px sans-serif">TAB</text>'
} else if (tab.length == 4) {
a.push('"tab4"')
if (!g.tab4)
// SMuFL: \ue06e
g.tab4 = '<text id="tab4"\
x="-3,-3,-3" y="-8,1,10"\
style="font:bold 12px sans-serif">TAB</text>'
} else if (tab.length == 5) {
a.push('"tab5"')
if (!g.tab5)
// SMuFL: -none-
g.tab5 = '<text id="tab5"\
x="-4,-4,-4" y="-11,-2,7"\
style="font:bold 12px sans-serif">TAB</text>'
} else {
a.push('"tab6"')
if (!g.tab6)
// SMuFL: \ue06d
g.tab6 = '<text id="tab6"\
x="-4,-4,-4" y="-14.5,-4,5.5"\
style="font:bold 13px sans-serif">TAB</text>'
}
a.push("stafflines=")
a.push("|||||||||".slice(0, tab.length))
p_v.staffscale = 1.6
// p_v.scale = .6
// p_v.straightflags = true
}
of(a)
}, // set_vp()
lib/ChordPro/res/config/chordpro.json view on Meta::CPAN
{"$schema":"https://chordpro.org/beta/resources/config.schema","a2crd":{"classifier":"pct_chords","infer-titles":true,"tabstop":8},"assets":{},"chord-formats":{"common":"%{root|%{}%{qual|%{}}%{ext|%{}}%{bass|/%{}}|%{name}}","nashville":"%{root|%{}%{q...
lib/ChordPro/res/config/chordpro.rjson view on Meta::CPAN
corefonts.remap : null
// Font families and properties.
// `fontconfig` maps members of font families to physical fonts.
// Optionally, additional properties of the fonts can be specified.
// Physical fonts can be the names of TrueType/OpenType fonts, or names of built-in fonts (`corefonts`).
// Relative filenames are looked up in the `fontdir`.
fontconfig {
serif {
"" : Times-Roman
bold : Times-Bold
italic : Times-Italic
bolditalic : Times-BoldItalic
}
times {
"" : Times-Roman
bold : Times-Bold
italic : Times-Italic
bolditalic : Times-BoldItalic
}
helvetica {
"" : Helvetica
bold : Helvetica-Bold
oblique : Helvetica-Oblique
boldoblique : Helvetica-BoldOblique
}
"sans, sans-serif" {
"" : Helvetica
bold : Helvetica-Bold
italic : Helvetica-Oblique
bolditalic : Helvetica-BoldOblique
}
courier {
"" : Courier
bold : Courier-Bold
italic : Courier-Oblique
bolditalic : Courier-BoldOblique
}
"mono, monospace" {
"" : Courier
bold : Courier-Bold
italic : Courier-Oblique
bolditalic : Courier-BoldOblique
}
"muse, musejazztext" {
"" : MuseJazzText.otf
bold : MuseJazzText.otf
italic : MuseJazzText.otf
bolditalic : MuseJazzText.otf
}
dingbats. : ZapfDingbats
}
// `fonts` maps output elements to fonts as defined in `fontconfig`.
//
// Some element mappings can be specified, but it's not needed for all since they default to other elements:
// subtitle --> text
// chorus --> text
// comment --> text
lib/ChordPro/res/config/chordpro.rjson view on Meta::CPAN
// Tab stop width for tab expansion. Set to `0` to disable.
// Tabs in the input source are replaced by an appropriate amount of spaces.
tabstop : 8
}
// Settings for the markup processor.
// Shortcodes allow user defined markup, e.g. <foo>...</foo>.
// ```
// markup.shortcode {
// heavy : "weight='bold' size='large'"
// }
// Each occurrence of <heavy>...</heavy> will be replaced by
// <span weight='bold' size='large'>...</span>.
// ```
markup.shortcodes {}
// Settings for the parser/preprocessor
parser {
// For the exceptional case you need brackets [] in your lyrics or annotations.
// These characters are replaced by normal brackets **after** chord analysis.
// E.g. `parser.altbrackets: "«»"`
// Use wisely. Better still, don't use this.
lib/ChordPro/res/config/config.schema view on Meta::CPAN
}
},
"fontConfigFont": {
"type": "object",
"additionalProperties": false,
"required": [""],
"properties": {
"": {
"type": "string"
},
"bold": {
"type": "string"
},
"italic": {
"type": "string"
},
"bolditalic": {
"type": "string"
},
"oblique": {
"type": "string"
},
"boldoblique": {
"type": "string"
}
},
"if": {
"anyOf": [
{
"required": ["italic"]
},
{
"required": ["bolditalic"]
}
]
},
"then": {
"not": {
"anyOf": [
{
"required": ["oblique"]
},
{
"required": ["boldoblique"]
}
]
}
},
"else": {
"not": {
"anyOf": [
{
"required": ["italic"]
},
{
"required": ["bolditalic"]
}
]
}
}
},
"fontClass": {
"type": "string",
"enum": [
"serif",
"times",
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"html": {
"description": "Specific settings for the HTML backend."
},
"pdf": {
"description": "Specific settings for the PDF backend."
}
}
},
"fontDescription": {
"type": "string",
"description": "A shorthand description of a font. In the format of `fontclass (bold)?(italic)? fontsize`.",
"$comment": "While visually complex, `pattern` was written so that each portion now has named capture groups, which can help with understanding and debugging the composition of the regular expression.",
"pattern": "^(?<nameOrType>[a-zA-Z\\-]+) ?(?<style>(?:bold)?(?:italic|oblique)?) ?(?<size>\\d+(?:\\.\\d+)?)?(?:;(?<addlProps> [^\\s=]+=[^\\s=]+)+)?$",
"examples": [
"serif bold 14",
"serif 11",
"serif 12",
"sans italic 10",
"sans italic 12",
"monospace 10",
"serif 11",
"sans 10",
"dingbats 10"
]
},
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"default": false
},
"force-common": {
"description": "Replace keys with an excessive number of sharps by their more common enharmonic equivalents.\nSee also `settings.transpose-sf-key`.",
"type": "boolean",
"default": false
}
}
},
"markup": {
"description": "Settings for the markup processor.\nShortcodes allow user defined markup, e.g. <foo>...</foo>.\n```\nmarkup.shortcode {\n heavy : \"weight='bold' size='large'\"\n}\nEach occurrence of <heavy>...</heavy> will be replaced b...
"type": "object",
"additionalProperties": false,
"properties": {
"shortcodes": {
"description": "",
"type": "object",
"additionalProperties": true
}
}
},
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"additionalProperties": false,
"properties": {
"": {
"type": "string"
}
}
}
},
"default": {
"serif": {
"bold": "Times-Bold",
"italic": "Times-Italic",
"bolditalic": "Times-BoldItalic",
"": "Times-Roman"
},
"times": {
"bold": "Times-Bold",
"italic": "Times-Italic",
"bolditalic": "Times-BoldItalic",
"": "Times-Roman"
},
"helvetica": {
"bold": "Helvetica-Bold",
"oblique": "Helvetica-Oblique",
"boldoblique": "Helvetica-BoldOblique",
"": "Helvetica"
},
"sans, sans-serif": {
"bold": "Helvetica-Bold",
"italic": "Helvetica-Oblique",
"bolditalic": "Helvetica-BoldOblique",
"": "Helvetica"
},
"courier": {
"bold": "Courier-Bold",
"italic": "Courier-Italic",
"bolditalic": "Courier-BoldItalic",
"": "Courier"
},
"mono, monospace": {
"bold": "Courier-Bold",
"italic": "Courier-Italic",
"bolditalic": "Courier-BoldItalic",
"": "Courier"
},
"dingbats": {
"": "ZapfDingbats"
}
}
},
"fonts": {
"description": "`fonts` maps output elements to fonts as defined in `fontconfig`.\n\nSome element mappings can be specified, but it's not needed for all since they default to other elements:\nsubtitle --> text\nchorus ...
"type": "object",
lib/ChordPro/res/config/config.schema view on Meta::CPAN
},
"examples": ["serif 12"]
},
"title": {
"$ref": "#/definitions/fontspec",
"description": "The font used for page titles.",
"default": {
"name": "Times-Bold",
"size": 14
},
"examples": ["serif bold 14"]
},
"toc": {
"$ref": "#/definitions/fontspec",
"description": "The font used for the table of contents. If not set, falls back on the `text` font.",
"default": {
"name": "Times-Roman",
"size": 11
},
"examples": ["serif 11"]
},
lib/ChordPro/res/config/config.tmpl view on Meta::CPAN
// "fontdir" : [ "/usr/share/fonts/liberation", "/home/me/fonts" ]
# pdf.fontdir : []
// Remap corefonts to better fonts. null = if possible.
# pdf.corefonts.remap : null
// IMPORTANT: THE ENTRY WITH THE TRAILING . DENOTES THE REGULAR FONT.
// The font families.
# pdf.fontconfig.serif. : Times-Roman
# pdf.fontconfig.serif.bold : Times-Bold
# pdf.fontconfig.serif.italic : Times-Italic
# pdf.fontconfig.serif.bolditalic : Times-BoldItalic
# pdf.fontconfig.times. : Times-Roman
# pdf.fontconfig.times.bold : Times-Bold
# pdf.fontconfig.times.italic : Times-Italic
# pdf.fontconfig.times.bolditalic : Times-BoldItalic
# pdf.fontconfig.helvetica. : Helvetica
# pdf.fontconfig.helvetica.bold : Helvetica-Bold
# pdf.fontconfig.helvetica.oblique : Helvetica-Oblique
# pdf.fontconfig.helvetica.boldoblique : Helvetica-BoldOblique
# pdf.fontconfig.sans. : Helvetica
# pdf.fontconfig.sans.bold : Helvetica-Bold
# pdf.fontconfig.sans.italic : Helvetica-Oblique
# pdf.fontconfig.sans.bolditalic : Helvetica-BoldOblique
# pdf.fontconfig.sans-serif. : Helvetica
# pdf.fontconfig.sans-serif.bold : Helvetica-Bold
# pdf.fontconfig.sans-serif.italic : Helvetica-Oblique
# pdf.fontconfig.sans-serif.bolditalic : Helvetica-BoldOblique
# pdf.fontconfig.courier. : Courier
# pdf.fontconfig.courier.bold : Courier-Bold
# pdf.fontconfig.courier.italic : Courier-Oblique
# pdf.fontconfig.courier.bolditalic : Courier-BoldOblique
# pdf.fontconfig.mono. : Courier
# pdf.fontconfig.mono.bold : Courier-Bold
# pdf.fontconfig.mono.italic : Courier-Oblique
# pdf.fontconfig.mono.bolditalic : Courier-BoldOblique
# pdf.fontconfig.monospace. : Courier
# pdf.fontconfig.monospace.bold : Courier-Bold
# pdf.fontconfig.monospace.italic : Courier-Oblique
# pdf.fontconfig.monospace.bolditalic : Courier-BoldOblique
# pdf.fontconfig.muse. : MuseJazzText.otf
# pdf.fontconfig.muse.bold : MuseJazzText.otf
# pdf.fontconfig.muse.italic : MuseJazzText.otf
# pdf.fontconfig.muse.bolditalic : MuseJazzText.otf
# pdf.fontconfig.musejazztext. : MuseJazzText.otf
# pdf.fontconfig.musejazztext.bold : MuseJazzText.otf
# pdf.fontconfig.musejazztext.italic : MuseJazzText.otf
# pdf.fontconfig.musejazztext.bolditalic : MuseJazzText.otf
// "fonts" maps output elements to fonts as defined in "fontconfig".
// The elements can have a background colour associated.
// Colours are "#RRGGBB" or predefined names like "black", "white",
// and lots of others.
// NOTE: In the built-in config we use only "name" since that can
// be overruled with user settings.
//
// Some element mappings can be specified, but need not since
// they default to other elements.
lib/ChordPro/res/config/config.tmpl view on Meta::CPAN
// annotation --> chord
// toc --> text
// grid --> chord
// grid_margin --> comment
// footer --> subtitle @ 60%
// empty --> text
// diagram --> comment
// diagram_base --> text (but at a small size)
// Font for typesetting titles.
# pdf.fonts.title : "serif bold 14"
// Font for typesetting lyrics.
# pdf.fonts.text : "serif 12"
// Font for typesetting chord names.
# pdf.fonts.chord : "sans italic 10"
// Colour specification.
# pdf.fonts.chordfingers.numbercolor : background
lib/ChordPro/res/config/config.tmpl view on Meta::CPAN
// Analysis strategy.
# a2crd.classifier : pct_chords
// Tab stop width for tab expansion. Set to zero to disable.
# a2crd.tabstop : 8
/**************** Settings for the markup processor ****************/
// Shortcodes allow user defined markup, e.g. <foo>...</foo>.
// With shortcode
// heavy : "weight='bold' size='large'"
// each occurrence of <heavy>...</heavy> will be replaced by
// <span weight='bold' size='large'>...</span>.
# markup.shortcodes {}
/**************** Settings for the parser/preprocessor ****************/
// For selected lines, you can specify a series of
// { "target" : "xxx", "replace" : "yyy" }
// Every occurrence of "xxx" will be replaced by "yyy".
// Use "pattern" instead of "target" for regular expression replacement.
// Use wisely.
# parser.preprocess.all : []
lib/ChordPro/res/config/modern1.json view on Meta::CPAN
// Indent of the chorus, not including bar.
indent : 12
// Appearance of side bar.
bar.width : 0.5
}
// "fonts" maps output elements to fonts as defined in "fontconfig".
fonts {
title: "sans-serif bold"
text : sans-serif
toc : sans-serif
}
}
// End of Config.
lib/ChordPro/res/config/modern2.json view on Meta::CPAN
// Formats.
formats.title {
// The first page of a song has:
title : [ "%{title}" "" "" ]
subtitle : [ "%{subtitle|%{}|%{subtitle}}" "" "" ]
}
// "fonts" maps output elements to fonts as defined in "fontconfig".
fonts {
title : "sans-serif bold"
text : sans-serif
chord : "sans-serif bold 12"
comment : "sans-serif 12"
toc : sans-serif
}
}
// End of config.
lib/ChordPro/res/config/modern3.json view on Meta::CPAN
// Formats.
formats.title {
// The first page of a song has:
title : [ "%{title}" "" "" ]
subtitle : [ "%{subtitle|%{}|%{subtitle}}" "" "" ]
}
fonts {
title : "sans-serif bold"
text : sans-serif
chord : "sans-serif bold 12"
comment : "sans-serif 12"
toc : "sans-serif 11"
}
}
// End of config.
lib/ChordPro/res/examples/mollymalone.json view on Meta::CPAN
title : [ "%{title}" "" "" ]
subtitle : [ "%{subtitle|%{}|%{subtitle}}" "" "" ]
}
// The very first page has:
formats.first.footer: [ "%{chordpro.songsource}", "", "%{chordpro|%{} %{chordpro.version}}" ]
fonts {
// Fonts for typesetting titles.
title.description : "sans bold 16"
subtitle.description : "sans italic 10"
footer.description : "sans 8"
// Fonts for typesetting lyrics and chords.
text.description : "sans 12"
chord.description : "sans bold 12"
}
}
lib/ChordPro/res/pod/Config.pod view on Meta::CPAN
corefonts.remap : null
// Font families and properties.
// `fontconfig` maps members of font families to physical fonts.
// Optionally, additional properties of the fonts can be specified.
// Physical fonts can be the names of TrueType/OpenType fonts, or names of built-in fonts (`corefonts`).
// Relative filenames are looked up in the `fontdir`.
fontconfig {
serif {
"" : Times-Roman
bold : Times-Bold
italic : Times-Italic
bolditalic : Times-BoldItalic
}
times {
"" : Times-Roman
bold : Times-Bold
italic : Times-Italic
bolditalic : Times-BoldItalic
}
helvetica {
"" : Helvetica
bold : Helvetica-Bold
oblique : Helvetica-Oblique
boldoblique : Helvetica-BoldOblique
}
"sans, sans-serif" {
"" : Helvetica
bold : Helvetica-Bold
italic : Helvetica-Oblique
bolditalic : Helvetica-BoldOblique
}
courier {
"" : Courier
bold : Courier-Bold
italic : Courier-Oblique
bolditalic : Courier-BoldOblique
}
"mono, monospace" {
"" : Courier
bold : Courier-Bold
italic : Courier-Oblique
bolditalic : Courier-BoldOblique
}
"muse, musejazztext" {
"" : MuseJazzText.otf
bold : MuseJazzText.otf
italic : MuseJazzText.otf
bolditalic : MuseJazzText.otf
}
dingbats. : ZapfDingbats
}
// `fonts` maps output elements to fonts as defined in `fontconfig`.
//
// Some element mappings can be specified, but it's not needed for all since they default to other elements:
// subtitle --> text
// chorus --> text
// comment --> text
lib/ChordPro/res/pod/Config.pod view on Meta::CPAN
// Tab stop width for tab expansion. Set to `0` to disable.
// Tabs in the input source are replaced by an appropriate amount of spaces.
tabstop : 8
}
// Settings for the markup processor.
// Shortcodes allow user defined markup, e.g. <foo>...</foo>.
// ```
// markup.shortcode {
// heavy : "weight='bold' size='large'"
// }
// Each occurrence of <heavy>...</heavy> will be replaced by
// <span weight='bold' size='large'>...</span>.
// ```
markup.shortcodes {}
// Settings for the parser/preprocessor
parser {
// For the exceptional case you need brackets [] in your lyrics or annotations.
// These characters are replaced by normal brackets **after** chord analysis.
// E.g. `parser.altbrackets: "«»"`
// Use wisely. Better still, don't use this.
lib/ChordPro/res/styles/chordpro.css view on Meta::CPAN
* {
font-family: "sans-serif";
}
div.song {
page-break-after: always;
}
div.title {
font-size: 18pt;
font-weight: bold;
/* position: running(title); */
}
div.subtitle {
font-size: 16pt;
}
div.chorus {
padding-left: 10pt;
border-left: 2pt solid black;
}
div.verse {
lib/ChordPro/res/styles/chordpro.css view on Meta::CPAN
table.songline + table.songline {
margin-top: 0pt;
margin-bottom: 0pt;
}
table.songline td {
white-space: pre;
}
table.songline tr.chords {
font-size: 12pt;
font-style: italic;
font-weight: bold;
color: blue;
page-break-after: avoid;
}
table.songline tr.lyrics {
font-size: 12pt;
}
table.songline td.annotation {
color: red;
}
table.songline td.indent {
lib/ChordPro/res/styles/chordpro_print.css view on Meta::CPAN
/* CSS for printing. */
@page {
size: A4 portrait;
@top-left {
/* Content specified by source style element. */
/* Until we have running headers and footers. */
/* content: element(title, first); */
font-size: 18pt;
font-weight: bold;
}
@top-center {
font-size: 18pt;
font-weight: bold;
}
@bottom-left {
font-size: 8pt;
content: "Produced by ChordProPlus";
}
@bottom-right {
font-size: 8pt;
content: "Page " counter(page) " of " counter(pages);
}
}
t/380_roundtrip.t view on Meta::CPAN
# "fontconfig" maps members of font families to physical fonts.
# Optionally, additional properties of the fonts can be specified.
# Physical fonts can be the names of TrueType/OpenType fonts
# or names of built-in fonts (corefonts).
# Relative filenames are looked up in the fontdir.
# fontdir = [ "/usr/share/fonts/liberation", "/home/me/fonts" ]
fontdir = null
fontconfig {
# alternatives: regular r normal <empty>
# alternatives: bold b strong
# alternatives: italic i oblique o emphasis
# alternatives: bolditalic bi italicbold ib boldoblique bo obliquebold ob
times {
'' = "Times-Roman"
bold = "Times-Bold"
italic = "Times-Italic"
bolditalic = "Times-BoldItalic"
}
helvetica {
'' = "Helvetica"
bold = "Helvetica-Bold"
oblique = "Helvetica-Oblique"
boldoblique = "Helvetica-BoldOblique"
}
courier {
'' = "Courier"
bold = "Courier-Bold"
italic = "Courier-Italic"
bolditalic = "Courier-BoldItalic"
}
dingbats {
"" = "ZapfDingbats"
}
}
# "fonts" maps output elements to fonts as defined in "fontconfig".
# The elements can have a background colour associated.
# Colours are "#RRGGBB" or predefined names like "black", "white"
# and lots of others.