use
vars
qw(@ISA $VERSION)
;
@ISA
=
qw(Font::TTF::Table)
;
$VERSION
= 0.0001;
sub
read
{
$_
[0]->read_dat;
$_
[0]->{
' read'
} = 1;
}
sub
out_xml
{
my
(
$self
,
$context
,
$depth
) =
@_
;
my
(
$fh
) =
$context
->{
'fh'
};
my
(
$dat
);
$self
->
read
;
$dat
= Font::TTF::Utils::XML_binhint(
$self
->{
' dat'
});
$dat
=~ s/\n(?!$)/\n
$depth
$context
->{
'indent'
}/omg;
$fh
->
print
(
"$depth<code>\n"
);
$fh
->
print
(
"$depth$context->{'indent'}$dat"
);
$fh
->
print
(
"$depth</code>\n"
);
$self
;
}
sub
XML_end
{
my
(
$self
) =
shift
;
my
(
$context
,
$tag
,
%attrs
) =
@_
;
if
(
$tag
eq
'code'
)
{
$self
->{
' dat'
} = Font::TTF::Utils::XML_hintbin(
$context
->{
'text'
});
return
$context
;
}
else
{
return
$self
->SUPER::XML_end(
@_
); }
}
1;