App-Music-ChordPro
view release on metacpan or search on metacpan
lib/ChordPro/Wx/Utils.pm view on Meta::CPAN
}
}
################ ################
# Create / update menu bar.
#
# setup_menubar is called by main ctor, update_menubar by the refresh
# methods of main and panels.
# This is intended to be called by a panel, but the actual menu bar is
# attached to the top level frame. The callbacks are routed to the
# methods in the panel, if possible.
use constant
{ M_ALL => 0xff,
M_MAIN => 0x01,
M_EDITOR => 0x02,
M_SONGBOOK => 0x04,
};
push( @EXPORT, qw( M_MAIN M_EDITOR M_SONGBOOK ) );
lib/ChordPro/lib/SVGPDF/FontManager.pm view on Meta::CPAN
return ( $f->{font},
$style->{'font-size'} || 12,
$f->{src} );
}
if ( my $cb = $svg->fc ) {
my $font;
unless ( ref($cb) eq 'ARRAY' ) {
$cb = [ $cb ];
}
# Run callbacks.
my %args = ( pdf => $svg->pdf, style => $style );
for ( @$cb ) {
eval { $font = $_->( $svg, %args ) };
croak($@) if $@;
last if $font;
}
if ( $font ) {
my $src = "Callback($key)";
$fc->{$key} = { font => $font, src => $src };
return ( $font,
$style->{'font-size'} || 12,
$src );
}
}
# 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($_);
( run in 0.565 second using v1.01-cache-2.11-cpan-8d75d55dd25 )