亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? afm.pm

?? ARM上的如果你對(duì)底層感興趣
?? PM
字號(hào):
# This -*- perl -*-  module is a simple parser for Adobe Font Metrics files.
# $Id: AFM.pm,v 1.16 1997/09/20 10:42:56 aas Exp $

package Font::AFM;

=head1 NAME

Font::AFM - Interface to Adobe Font Metrics files

=head1 SYNOPSIS

 use Font::AFM;
 $h = new Font::AFM "Helvetica";
 $copyright = $h->Notice;
 $w = $h->Wx->{"aring"};
 $w = $h->stringwidth("Gisle", 10);
 $h->dump;  # for debugging

=head1 DESCRIPTION

This module implements the Font::AFM class. Objects of this class are
initialised from an AFM-file and allows you to obtain information
about the font and the metrics of the various glyphs in the font.

All measurements in AFM files are given in terms of units equal to
1/1000 of the scale factor of the font being used. To compute actual
sizes in a document, these amounts should be multiplied by (scale
factor of font)/1000.

The following methods are available:

=over 3

=item $afm = Font::AFM->new($fontname)

Object constructor. Takes the name of the font as argument. It will
croak if the font can not be found.

=item $afm->latin1_wx_table()

Returns a 256 element array, where each element contains the width
of the corresponding character in the iso-8859-1 character set.

=item $afm->stringwidth($string, [$fontsize])

Returns the width of the string passed as argument. The string is
assumed to be encoded in the iso-8859-1 character set.  A second
argument can be used to scale the width according to the font size.

=item $afm->FontName

The name of the font as presented to the PostScript language
C<findfont> operator, for instance "Times-Roman".

=item $afm->FullName

Unique, human-readable name for an individual font, for instance
"Times Roman".

=item $afm->FamilyName

Human-readable name for a group of fonts that are stylistic variants
of a single design. All fonts that are member of such a group should
have exactly the same C<FamilyName>. Example of a family name is
"Times".

=item $afm->Weight

Human-readable name for the weight, or "boldness", attribute of a font.
Exampes are C<Roman>, C<Bold>, C<Light>.

=item $afm->ItalicAngle

Angle in degrees counterclockwise from the vertical of the dominant
vertical strokes of the font.

=item $afm->IsFixedPitch

If the value is C<true>, it indicated that the font is a fixed-pitch
(monospaced) font.

=item $afm->FontBBox

A string of four numbers giving the lower-left x, lower-left y,
upper-right x, and upper-right y of the font bounding box. The font
bounding box is the smallest rectangle enclosing the shape that would
result if all the characters of the font were placed with their
origins coincident, and then painted.

=item $afm->UnderlinePosition

Recommended distance from the baseline for positioning underline
stokes. This number is the y coordinate of the center of the stroke.

=item $afm->UnderlineThickness

Recommended stroke width for underlining.

=item $afm->Version

Version number of the font.

=item $afm->Notice

Trademark or copyright notice, if applicable.

=item $afm->Comment

Comments found in the AFM file.

=item $afm->EncodingScheme

The name of the standard encoding scheme for the font. Most Adobe
fonts use the C<AdobeStandardEncoding>. Special fonts might state
C<FontSpecific>.

=item $afm->CapHeight

Usually the y-value of the top of the capital H.

=item $afm->XHeight

Typically the y-value of the top of the lowercase x.

=item $afm->Ascender

Typically the y-value of the top of the lowercase d.

=item $afm->Descender

Typically the y-value of the bottom of the lowercase p.

=item $afm->Wx

Returns a hash table that maps from glyph names to the width of that glyph.

=item $afm->BBox

Returns a hash table that maps from glyph names to bounding box information.
The bounding box consist of 4 numbers: llx, lly, urx, ury.

=item $afm->dump

Dumps the content of the Font::AFM object to STDOUT.  Might sometimes
be useful for debugging.

=back


The AFM specification can be found at:

   ftp://ftp.adobe.com/pub/adobe/DeveloperSupport/TechNotes/PSfiles/5004.AFM_Spec.ps


=head1 ENVIRONMENT

=over 10

=item METRICS

Contains the path to seach for AFM-files.  Format is as for the PATH
environment variable. The default path built into this library is:

 /usr/lib/afm:/usr/local/lib/afm:/usr/openwin/lib/fonts/afm/:.

=back


=head1 BUGS

Kerning data and composite character data is not yet parsed.
Ligature data is not parsed.


=head1 COPYRIGHT

Copyright 1995-1997 Gisle Aas. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

#-------perl resumes here--------------------------------------------

use Carp;
use strict;
use vars qw($VERSION @ISOLatin1Encoding);

$VERSION = sprintf("%d.%02d", q$Revision: 1.16 $ =~ /(\d+)\.(\d+)/);


# The metrics_path is used to locate metrics files
#
my $metrics_path = $ENV{METRICS} ||
    "/usr/lib/afm:/usr/local/lib/afm:/usr/openwin/lib/fonts/afm/:.";
my @metrics_path = split(/:/, $metrics_path);
foreach (@metrics_path) { s,/$,, }    # reove trailing slashes

@ISOLatin1Encoding = qw(
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space
 exclam quotedbl numbersign dollar percent ampersand quoteright
 parenleft parenright asterisk plus comma minus period slash zero one
 two three four five six seven eight nine colon semicolon less equal
 greater question at A B C D E F G H I J K L M N O P Q R S
 T U V W X Y Z bracketleft backslash bracketright asciicircum
 underscore quoteleft a b c d e f g h i j k l m n o p q r s
 t u v w x y z braceleft bar braceright asciitilde .notdef .notdef
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
 .notdef .notdef .notdef .notdef .notdef .notdef .notdef dotlessi grave
 acute circumflex tilde macron breve dotaccent dieresis .notdef ring
 cedilla .notdef hungarumlaut ogonek caron space exclamdown cent
 sterling currency yen brokenbar section dieresis copyright ordfeminine
 guillemotleft logicalnot hyphen registered macron degree plusminus
 twosuperior threesuperior acute mu paragraph periodcentered cedilla
 onesuperior ordmasculine guillemotright onequarter onehalf threequarters
 questiondown Agrave Aacute Acircumflex Atilde Adieresis Aring AE
 Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex
 Idieresis Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis
 multiply Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn
 germandbls agrave aacute acircumflex atilde adieresis aring ae
 ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex
 idieresis eth ntilde ograve oacute ocircumflex otilde odieresis divide
 oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis
);


# Creates a new Font::AFM object.  Pass it the name of the font as parameter.
# Synopisis:
#
#    $h = new Font::AFM "Helvetica";
#

sub new
{
   my($class, $fontname) = @_;
   my $file;
   $fontname =~ s/.amf$//;
   if ($^O eq 'VMS') {
       $file = "sys\$ps_font_metrics:$fontname.afm";
   } else {
       $file = "$fontname.afm";
       unless ($file =~ m,^/,) {
	   # not absolute, search the metrics path for the file
	   foreach (@metrics_path) {
	       if (-f "$_/$file") {
		   $file = "$_/$file";
		   last;
	       }
	   }
       }
   }
   open(AFM, $file) or croak "Can't find the AFM file for $fontname";
   my $self = bless { }, $class;
   local($/, $_) = ("\n", undef);  # ensure correct $INPUT_RECORD_SEPARATOR
   while (<AFM>) {
       next if /^StartKernData/ .. /^EndKernData/;  # kern data not parsed yet
       next if /^StartComposites/ .. /^EndComposites/; # same for composites
       if (/^StartCharMetrics/ .. /^EndCharMetrics/) {
	   # only lines that start with "C" or "CH" are parsed
	   next unless /^CH?\s/;
	   my($name) = /\bN\s+(\.?\w+)\s*;/;
	   my($wx)   = /\bWX\s+(\d+)\s*;/;
	   my($bbox)    = /\bB\s+([^;]+);/;
	   $bbox =~ s/\s+$//;
	   # Should also parse lingature data (format: L successor lignature)
	   $self->{'wx'}{$name} = $wx;
	   $self->{'bbox'}{$name} = $bbox;
	   next;
       }
       last if /^EndFontMetrics/;
       if (/(^\w+)\s+(.*)/) {
	   my($key,$val) = ($1, $2);
	   $key = lc $key;
	   if (defined $self->{$key}) {
	       $self->{$key} = [ $self->{$key} ] unless ref $self->{$key};
	       push(@{$self->{$key}}, $val);
	   } else {
	       $self->{$key} = $val;
	   }
       } else {
	   print STDERR "Can't parse: $_";
       }
   }
   close(AFM);
   unless (exists $self->{wx}->{'.notdef'}) {
       $self->{wx}->{'.notdef'} = 0;
       $self->{bbox}{'.notdef'} = "0 0 0 0";
   }
   $self;
}

# Returns an 256 element array that maps from characters to width
sub latin1_wx_table
{
    my($self) = @_;
    unless ($self->{'_wx_table'}) {
	my @wx;
	for (0..255) {
	    my $name = $ISOLatin1Encoding[$_];
	    if (exists $self->{wx}->{$name}) {
		push(@wx, $self->{wx}->{$name})
	    } else {
		push(@wx, $self->{wx}->{'.notdef'});
	    }
	}
	$self->{'_wx_table'} = \@wx;
    }
    wantarray ? @{ $self->{'_wx_table'} } : $self->{'_wx_table'};
}

sub stringwidth
{
    my($self, $string, $pointsize) = @_;
    return 0.0 unless defined $string;
    return 0.0 unless length $string;

    my @wx = $self->latin1_wx_table;
    my $width = 0.0;
    for (unpack("C*", $string)) {
	$width += $wx[$_];
    }
    if ($pointsize) {
	$width *= $pointsize / 1000;
    }
    $width;
}

sub FontName;
sub FullName;
sub FamilyName;
sub Weight;
sub ItalicAngle;
sub IsFixedPitch;
sub FontBBox;
sub UnderlinePosition;
sub UnderlineThickness;
sub Version;
sub Notice;
sub Comment;
sub EncodingScheme;
sub CapHeight;
sub XHeight;
sub Ascender;
sub Descender;
sub Wx;
sub BBox;

# We implement all the access functions within this simple autoload
# function.

sub AUTOLOAD
{
    no strict 'vars';  # don't want to declare $AUTOLOAD

    #print "AUTOLOAD: $AUTOLOAD\n";
    if ($AUTOLOAD =~ /::DESTROY$/) {
	eval "sub $AUTOLOAD {}";
	goto &$AUTOLOAD;
    } else {
	my $name = $AUTOLOAD;
	$name =~ s/^.*:://;
	croak "Attribute $name not defined for AFM object"
	    unless defined $_[0]->{lc $name};
	return $_[0]->{lc $name};
    }
}


# Dumping might be usefull for debugging

sub dump
{
    my($self) = @_;
    my($key, $val);
    foreach $key (sort keys %$self) {
	if (ref $self->{$key}) {
	    if (ref $self->{$key} eq "ARRAY") {
		print "$key = [\n\t", join("\n\t", @{$self->{$key}}), "\n]\n";
	    } elsif (ref $self->{$key} eq "HASH") {
		print "$key = {\n";
		my $key2;
		foreach $key2 (sort keys %{$self->{$key}}) {
		    print "\t$key2 => $self->{$key}{$key2},\n";
		}
		print "}\n";
	    } else {
		print "$key = $self->{$key}\n";
	    }
	} else {
	    print "$key = $self->{$key}\n";
	}
    }
}

1;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色先锋资源久久综合| 精品国免费一区二区三区| 欧美一区二区三区视频在线 | 激情五月婷婷综合| www.日韩av| 欧美α欧美αv大片| 一区二区三区高清在线| 成人高清av在线| 久久亚洲精品小早川怜子| 亚洲一区免费视频| 91香蕉国产在线观看软件| 国产亚洲一区二区三区四区 | 五月天亚洲精品| 色悠久久久久综合欧美99| 国产精品欧美精品| 九一九一国产精品| 日韩亚洲欧美综合| 蜜桃av一区二区| 7777精品伊人久久久大香线蕉| 亚洲激情网站免费观看| 波多野结衣在线一区| 国产精品视频免费看| 国产高清亚洲一区| 久久精品一区二区三区不卡| 国产做a爰片久久毛片| 精品国产伦一区二区三区免费| 日精品一区二区| 欧美一区二区三区免费在线看| 亚洲成av人片| 欧美一区二区三区在线观看| 毛片av中文字幕一区二区| 日韩欧美视频在线| 激情丁香综合五月| 国产日韩欧美综合在线| 不卡的电影网站| 一区二区三区中文字幕精品精品 | 欧美性色综合网| 亚洲一级二级三级在线免费观看| 欧美亚洲国产一区二区三区va| 亚洲成av人**亚洲成av**| 制服丝袜亚洲网站| 久久疯狂做爰流白浆xx| 久久精品人人爽人人爽| 91丨porny丨首页| 亚洲制服丝袜一区| 欧美一级生活片| 高潮精品一区videoshd| 国产精品久久福利| 欧美日韩中文精品| 美女视频黄 久久| 国产精品三级av| 欧美日韩精品一区二区天天拍小说| 日韩—二三区免费观看av| 久久久欧美精品sm网站| 91蜜桃在线免费视频| 偷窥国产亚洲免费视频| 久久精品免费在线观看| 色呦呦网站一区| 国内精品嫩模私拍在线| 亚洲视频免费在线观看| 欧美放荡的少妇| 成人精品亚洲人成在线| 天天色综合天天| 国产精品视频麻豆| 欧美一区二区三区四区在线观看| 国产成人精品影视| 五月婷婷另类国产| 亚洲国产精品精华液2区45| 欧美日韩激情一区二区三区| 国产麻豆视频一区| 亚洲一二三四区| 国产精品麻豆99久久久久久| 91麻豆精品国产91久久久久久 | 国产精品久久久久一区二区三区 | 亚洲欧美偷拍卡通变态| 日韩一区二区在线播放| 色婷婷av一区二区三区软件| 国产一区美女在线| 亚洲成人免费视频| 一区在线观看视频| 久久日韩精品一区二区五区| 欧美区在线观看| 一本色道久久加勒比精品| 国产成人午夜电影网| 日本亚洲最大的色成网站www| 亚洲九九爱视频| 中国色在线观看另类| 精品盗摄一区二区三区| 91麻豆精品91久久久久久清纯| 一本一道久久a久久精品 | 亚洲丝袜制服诱惑| 久久伊99综合婷婷久久伊| 337p亚洲精品色噜噜狠狠| 91小视频免费看| 成人久久视频在线观看| 国产在线国偷精品产拍免费yy| 日本女优在线视频一区二区| 亚洲香蕉伊在人在线观| 亚洲日本中文字幕区| 国产精品毛片久久久久久久| 国产清纯白嫩初高生在线观看91| 精品成人一区二区| 欧美一级欧美一级在线播放| 欧美日本一道本| 欧美日本高清视频在线观看| 91豆麻精品91久久久久久| 99久久免费国产| 91亚洲精品久久久蜜桃网站| 91小视频免费看| 色综合 综合色| 欧美午夜一区二区三区免费大片| 91豆麻精品91久久久久久| 在线观看一区不卡| 欧美视频在线观看一区二区| 欧美日本一道本| 欧美一区二区三区爱爱| 日韩久久精品一区| 久久久99精品免费观看| 国产欧美一区二区三区鸳鸯浴 | 欧美日韩国产美女| 欧美日韩国产片| 日韩天堂在线观看| 精品999在线播放| 日本一区二区三区dvd视频在线| 国产三级欧美三级| 亚洲欧美视频在线观看视频| 亚洲国产中文字幕| 狂野欧美性猛交blacked| 国产精品综合视频| 不卡一区中文字幕| 欧美三区在线视频| 欧美电影免费观看高清完整版在| 久久精品夜夜夜夜久久| 亚洲欧美一区二区不卡| 日本不卡中文字幕| 国模娜娜一区二区三区| 91在线观看一区二区| 欧美久久高跟鞋激| 久久久久久久综合狠狠综合| 亚洲色欲色欲www在线观看| 日韩精品电影在线观看| 丁香天五香天堂综合| 欧美亚洲综合网| 久久蜜臀精品av| 亚洲一区二区三区四区五区中文 | 91网站最新网址| 欧美一区二区三区在| 欧美国产精品中文字幕| 午夜国产精品一区| 国产不卡高清在线观看视频| 欧美性感一区二区三区| 久久精品一级爱片| 亚洲成人资源在线| 成人黄页毛片网站| 日韩三级在线观看| 国产精品每日更新| 九色|91porny| 欧美伊人精品成人久久综合97 | 轻轻草成人在线| 91视频com| 国产日韩综合av| 日韩成人精品视频| 色婷婷精品久久二区二区蜜臂av | 国产女主播视频一区二区| 亚洲精品亚洲人成人网| 国内精品第一页| 5858s免费视频成人| 国产精品国产a级| 国产剧情av麻豆香蕉精品| 555www色欧美视频| 亚洲国产精品久久人人爱蜜臀| 成人禁用看黄a在线| 久久青草国产手机看片福利盒子| 亚洲国产成人高清精品| 色综合视频在线观看| 国产视频一区在线播放| 久久99精品网久久| 欧美一区二区成人| 亚洲国产精品一区二区www在线 | 白白色 亚洲乱淫| 国产香蕉久久精品综合网| 美女网站一区二区| 欧美三级电影一区| 亚洲美女免费视频| 成年人网站91| 中文字幕av一区二区三区免费看| 国产精品自拍av| 久久久久88色偷偷免费| 精品一区二区三区视频在线观看| 91精选在线观看| 青青草97国产精品免费观看无弹窗版| 欧美系列在线观看| 亚洲成人av一区二区三区| 欧美日韩中文一区| 日韩一区欧美二区| 日韩免费观看高清完整版| 精品一二线国产| 久久精品亚洲麻豆av一区二区 | 国内精品视频一区二区三区八戒| 欧美一级高清片|