App-Chart

 view release on metacpan or  search on metacpan

lib/App/Chart/Pango/Ex/ANSItoMarkup.pm  view on Meta::CPAN

#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.


package App::Chart::Pango::Ex::ANSItoMarkup;
use 5.008;
use strict;
use warnings;

my %shorthand = ('<span weight=bold'        => 'b',
                 '<span style=italic'       => 'i',
                 '<span strikethrough=true' => 's',
                 '<span underline=single'   => 'u');

my @colour = ('black',
              'red',
              'green',
              'yellow',
              'blue',
              'magenta',

lib/App/Chart/Pango/Ex/ANSItoMarkup.pm  view on Meta::CPAN

                      [KL])?)?
                  ([^\e]*))          # $4 plain text after
                 /gx) {
    my $part = $4;
    if (defined $3) {
      foreach my $num (split /;/, $3) {
        if ($num == 0) {
          @$attr = ();

        } elsif ($num == 1) {
          # bold
          $attr->[_A_WEIGHT] = 'weight=bold';

        } elsif ($num == 2) {
          # faint, or dark, or something
          $attr->[_A_WEIGHT] = 'weight=light';

        } elsif ($num == 3) {
          # italic
          $attr->[_A_STYLE] = 'style=italic';

        } elsif ($num == 4) {

lib/App/Chart/Pango/Ex/ANSItoMarkup.pm  view on Meta::CPAN

          # 11 first alternative font
          # ...
          # 19 ninth alternative font
          # 20 fraktur gothic

        } elsif ($num == 21) {
          # double underline
          $attr->[_A_UNDERLINE] = 'underline=double';

        } elsif ($num == 22) {
          # normal colour/intensity, ie. neither bold nor faint
          $attr->[_A_WEIGHT] = undef;

        } elsif ($num == 23) {
          # not italic
          $attr->[_A_STYLE] = undef;

        } elsif ($num == 24) {
          # not underlined
          $attr->[_A_UNDERLINE] = undef;

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<link href="dir.html#Top" rel="prev" title="(dir)">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter-printindex {text-decoration: none}
div.center {text-align:center}
div.example {margin-left: 3.2em}
kbd.kbd {font-style: oblique}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
td.printindex-index-entry {vertical-align: top}
td.printindex-index-section {vertical-align: top; padding-left: 1em}
th.entries-header-printindex {text-align:left}
th.sections-header-printindex {text-align:left; padding-left: 1em}
ul.mark-bullet {list-style-type: disc}
-->
</style>


</head>



( run in 0.994 second using v1.01-cache-2.11-cpan-c333fce770f )