SAP ABAP Class CL_UPE_FONTMETRIC (Fontmetrics for UPE)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-CCM-PRN (Application Component) Print and Output Management
     S_UPE_SERVICES (Package) Services for Unicode Printing Enhancement (UPE)
Properties
Class CL_UPE_FONTMETRIC  
Short Description Fontmetrics for UPE    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class    
Program status     
Category 0   
Package S_UPE_SERVICES   Services for Unicode Printing Enhancement (UPE) 
Created 20100219   SAP 
Last change 20140121   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
2 CL_UPE_FONTMETRIC Forward declaration class (CLASS c DEFINITION DEFERRED)  Forward declaration class (CLASS c DEFINITION DEFERRED)
Interfaces
Class CL_UPE_FONTMETRIC has no interface implemented.
Friends
Class CL_UPE_FONTMETRIC has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 BOLD Instance attribute Public Type reference (TYPE) TDBOLD Font attribute bold type 20100219
2 CUSTOM_FONTNAME Instance attribute Public Type reference (TYPE) STRING Name of custom font 20100326
3 C_MINIMUM_RANGELEN Constant Private Type reference (TYPE) I 4 Minimum length of range 20100219
4 C_TEXTFORMATTAG_DT Constant Private Type reference (TYPE) C 'D' Device type info 20100219
5 C_TEXTFORMATTAG_FONTMAP Constant Private Type reference (TYPE) C 'M' Font map 20100511
6 C_TEXTFORMATTAG_RANGE Constant Private Type reference (TYPE) C 'R' Metric range 20100219
7 C_TEXTFORMATTAG_SINGLE Constant Private Type reference (TYPE) C 'S' Single metric 20100219
8 C_TEXTFORMAT_VER1 Constant Private Type reference (TYPE) STRING 'UPEMETRICS_V1' Variant 1 for textformat 20100219
9 DEVTYPE Instance attribute Public Type reference (TYPE) RSPOPTYPE_UPE Spool: Device type name 20100219
10 FONTMAPPING Instance attribute Public Type reference (TYPE) T_FONTMAPTAB Table of font mappings 20100219
11 FONTSIZE Instance attribute Public Type reference (TYPE) TDFONTSIZE Font attribute: font size in 1/10 point 20100219
12 IS_CUSTOM_FONT Instance attribute Public Type reference (TYPE) ABAP_BOOL Customer font? 20100326
13 IS_SYMBOL_FONT Instance attribute Public Type reference (TYPE) ABAP_BOOL Customer font is symbol font? 20100326
14 ITALIC Instance attribute Public Type reference (TYPE) TDITALIC Font attribute italic 20100219
15 MISSING_CHARACTER_FLAG Instance attribute Public Type reference (TYPE) ABAP_BOOL SPACE Indicates that a char from a non-resident font was used 20100219
16 NUMCHARS_RANGES Instance attribute Public Type reference (TYPE) I 0 number of chars in ranges 20100219
17 NUMCHARS_SINGLE Instance attribute Public Type reference (TYPE) I 0 number of single chars 20100219
18 NUMCHARS_TOTAL Instance attribute Public Type reference (TYPE) I 0 total number of chars 20100219
19 NUM_RANGES Instance attribute Public Type reference (TYPE) I 0 number of ranges 20100219
20 RANGEMET Instance attribute Public Type reference (TYPE) T_RANGEMETTAB Table of codepoint ranges 20100219
21 SAPFONT Instance attribute Public Type reference (TYPE) TDFAMILY Font attribute: Name of font family 20100219
22 SINGLEMET Instance attribute Public Type reference (TYPE) T_CHARMETRICTAB Table of codepoint ranges 20100219
Methods
# Method Level Visibility Method type Description Created on
1 CLEAR_MISSING_CHAR Instance method Public Method Clear MISSING_CHAR flag 20100219
2 CLONE Instance method Public Method Create new metric from existing, changing FAMILY,BOLD,ITALIC 20120430
3 CODEPOINT_USED Instance method Public Method Is metric for codepoint available? 20100219
4 COMPARE_METRICS Static method Public Method Check two fontmetrics for equality 20100511
5 CONSTRUCTOR Instance method Public Constructor Create 20100219
6 FONTMAPPING_ADD Instance method Public Method Add font mapping 20100219
7 MATCH_REF_CHARS Instance method Public Method Delete all metrics which are not in reference list 20100219
8 METRICS_ADD Instance method Public Method Add table of new metrics (unit=TW), do not overwrite exist. 20100219
9 METRICS_ADD_EM Instance method Public Method Add table of new metrics (unit=EM), do not overwrite exist. 20100325
10 METRICS_DELETE Instance method Public Method Delete table of metrics 20100219
11 METRICS_MERGE Instance method Public Method Combine metrics with existing metrics 20100219
12 METRICS_READ Instance method Public Method Return metrics table 20100219
13 METRICS_READ_FONTINDEX Instance method Public Method Return metrics table for given font index 20100219
14 METRICS_TO_TEXT Static method Public Method Convert UPE metrics to flat text table 20100219
15 METRIC_ADD Instance method Public Method Add single metric, do not overwrite existing 20100219
16 METRIC_ADD_EM Instance method Public Method Add metric with unit EM 20100325
17 METRIC_ADD_EM_NOCHECK Instance method Public Method Add metric with unit EM, no check for duplicates 20120430
18 METRIC_ADD_PRIV Instance method Private Method Add single metric, do not overwrite existing 20100326
19 METRIC_ADD_RANGE_EM Instance method Public Method Add metric range with unit EM 20100419
20 METRIC_ADD_RANGE_EM_NOCHECK Instance method Public Method Add metric range with unit EM, no check for duplicates 20120430
21 METRIC_ADD_RANGE_PRIV Instance method Private Method Add metric range 20100419
22 METRIC_DELETE Instance method Public Method Delete single metric 20100219
23 METRIC_MERGE Instance method Public Method Combine metrics with existing metrics 20120925
24 METRIC_READ Instance method Public Method Read single metric (set missing char flag) 20100219
25 MET_EM_TO_TW Instance method Private Method Convert EM to TWIP 20100326
26 MET_TW_TO_EM Instance method Private Method Convert TWIP to EM 20100326
27 OPTIMIZE_RANGES Instance method Private Method Move runs from singles to ranges, combine ranges 20100219
28 SHOWINFO Instance method Public Method Show data 20100219
29 TEXT_TO_METRICS Static method Public Method Convert flat text table to UPE metrics 20100219
30 TTFONT_REPLACE Instance method Public Method Replace TTFont 20121108
31 UPDATE_COUNTERS Instance method Private Method Update metrics char counters 20100219
Events
Class CL_UPE_FONTMETRIC has no event.
Types
# Type Visibility Typing Associated Type Description Created on Type Source
1 T_CHARMETRIC Public See coding Metric of single char 20100219 begin of T_CHARMETRIC, ucix type i, width_tw type i, fontindex(1) type x, width_em type i, end of T_CHARMETRIC
2 T_CHARMETRICTAB Public See coding Table of metrics 20100219 T_CHARMETRICTAB type sorted table of T_CHARMETRIC with unique key ucix
3 T_FONTMAPREC Public See coding Mapping of OpenType font to 1-byte number 20100219 begin of T_FONTMAPREC, fontindex(1) type x, physid type TFR_PHYSFONTID, logidx type TFR_INDEX, fontname type string, bold type tdbold, italic type tditalic, stylestring type string, end of T_FONTMAPREC
4 T_FONTMAPTAB Public See coding Table of font mappings 20100219 T_FONTMAPTAB type sorted table of T_FONTMAPREC with unique key fontindex
5 T_RANGEMETREC Public See coding Range of codepoints with same width/font 20100219 begin of T_RANGEMETREC, start type i, end type i, width_tw type i, fontindex(1) type x, "0 means resident font width_em type i, end of T_RANGEMETREC
6 T_RANGEMETTAB Public See coding Table of codepoint ranges 20100219 T_RANGEMETTAB type sorted table of T_RANGEMETREC with unique key start
7 T_TEXTTAB Public See coding Text representation of metrics 20100219 T_TEXTTAB type standard table of AFMLN with default key
Method Signatures

Method CLEAR_MISSING_CHAR Signature

Method CLEAR_MISSING_CHAR on class CL_UPE_FONTMETRIC has no parameter.
Method CLEAR_MISSING_CHAR on class CL_UPE_FONTMETRIC has no exception.

Method CLONE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_CLONED_BOLD Call by reference Type reference (TYPE) TDBOLD SPACE Font attribute bold type 20120430
2 Importing IM_CLONED_ITALIC Call by reference Type reference (TYPE) TDITALIC SPACE Font attribute italic 20120430
3 Importing IM_CLONED_SAPFONT Call by reference Type reference (TYPE) TDFAMILY Font attribute: Name of font family 20120430
4 Returning RT_CLONED_METRIC Value transfer Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20120430

Method CLONE on class CL_UPE_FONTMETRIC has no exception.

Method CODEPOINT_USED Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_UCIX Call by reference Type reference (TYPE) I Codepoint 20100219
2 Returning RT_USED Value transfer Type reference (TYPE) ABAP_BOOL Used? 20100219

Method CODEPOINT_USED on class CL_UPE_FONTMETRIC has no exception.

Method COMPARE_METRICS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_METRIC1 Call by reference Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20100511
2 Importing IM_METRIC2 Call by reference Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20100511
3 Returning RT_NOTEQUAL_MSG Value transfer Type reference (TYPE) STRING Message if metrics differ 20100511

Method COMPARE_METRICS on class CL_UPE_FONTMETRIC has no exception.

Method CONSTRUCTOR Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_BOLD Call by reference Type reference (TYPE) TDBOLD Font attribute bold type 20100219
2 Importing IM_DEVTYPE Call by reference Type reference (TYPE) RSPOPTYPE_UPE Spool: Device type name 20100219
3 Importing IM_FONTSIZE Call by reference Type reference (TYPE) TDFONTSIZE Font attribute: font size in 1/10 point 20100219
4 Importing IM_ITALIC Call by reference Type reference (TYPE) TDITALIC Font attribute italic 20100219
5 Importing IM_LOAD_UCMET_FROM_DT Call by reference Type reference (TYPE) ABAP_BOOL SPACE Fill metrics from UCFMET API? 20100219
6 Importing IM_SAPFONT Call by reference Type reference (TYPE) TDFAMILY Font attribute: Name of font family 20100219
# Exception Resumable Description Created on
1 CANNOT_LOAD_METRICS Failure to pre-load font metrics for devtype 20100219

Method FONTMAPPING_ADD Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTMAPPING Call by reference Type reference (TYPE) T_FONTMAPREC Mapping of OpenType font to 1-byte number 20100219

Method FONTMAPPING_ADD on class CL_UPE_FONTMETRIC has no exception.

Method MATCH_REF_CHARS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_CHARTABLE Call by reference Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100219

Method MATCH_REF_CHARS on class CL_UPE_FONTMETRIC has no exception.

Method METRICS_ADD Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Font 20100219
2 Importing IM_METRICTABLE Call by reference Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100219
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED Font is not mapped 20100219

Method METRICS_ADD_EM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Font 20100325
2 Importing IM_METRICTABLE Call by reference Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100325
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED Font index is not mapped 20100326

Method METRICS_DELETE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_METRICTABLE Call by reference Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100219

Method METRICS_DELETE on class CL_UPE_FONTMETRIC has no exception.

Method METRICS_MERGE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_ALLOW_OVERWRITE Call by reference Type reference (TYPE) ABAP_BOOL ABAP_FALSE Overwrite in target from source 20100219
2 Importing IM_SOURCE Call by reference Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20100219

Method METRICS_MERGE on class CL_UPE_FONTMETRIC has no exception.

Method METRICS_READ Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning RT_METRICTABLE Value transfer Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100219

Method METRICS_READ on class CL_UPE_FONTMETRIC has no exception.

Method METRICS_READ_FONTINDEX Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Font 20100219
2 Returning RT_METRICTABLE Value transfer Type reference (TYPE) T_CHARMETRICTAB Table of metrics 20100219

Method METRICS_READ_FONTINDEX on class CL_UPE_FONTMETRIC has no exception.

Method METRICS_TO_TEXT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTMETRIC Call by reference Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20100219
2 Importing IM_URDTNAME Call by reference Type reference (TYPE) RSPOPTYPE_UPE Name of URDT 20130417
3 Returning RT_TEXTTABLE Value transfer Type reference (TYPE) T_TEXTTAB Text table 20100219

Method METRICS_TO_TEXT on class CL_UPE_FONTMETRIC has no exception.

Method METRIC_ADD Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Index of font 20100219
2 Importing IM_UCIX Call by reference Type reference (TYPE) I Codepoint 20100219
3 Importing IM_WIDTH_TW Call by reference Type reference (TYPE) I Width in twip 20100219
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED This font index is not known in FONTMAPPING 20100219

Method METRIC_ADD_EM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' 20100325
2 Importing IM_UCIX Call by reference Type reference (TYPE) I 20100325
3 Importing IM_WIDTH_EM Call by reference Type reference (TYPE) I 20100325

Method METRIC_ADD_EM on class CL_UPE_FONTMETRIC has no exception.

Method METRIC_ADD_EM_NOCHECK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Font index 20120430
2 Importing IM_UCIX Call by reference Type reference (TYPE) I Unicode codepoint 20120430
3 Importing IM_WIDTH_EM Call by reference Type reference (TYPE) I Width in EM 20120430
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED Fontindex does not exists/is not valid 20120430

Method METRIC_ADD_PRIV Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X '00' Index of font 20100326
2 Importing IM_UCIX Call by reference Type reference (TYPE) I Codepoint 20100326
3 Importing IM_WIDTH_EM Value transfer Type reference (TYPE) I Width in EM 20100326
4 Importing IM_WIDTH_TW Value transfer Type reference (TYPE) I Width in twip 20100326
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED This font index is not known in FONTMAPPING 20100326

Method METRIC_ADD_RANGE_EM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X Fontindex 20100419
2 Importing IM_UCIX_END Call by reference Type reference (TYPE) I End codepoint 20100419
3 Importing IM_UCIX_START Call by reference Type reference (TYPE) I Start codepoint 20100419
4 Importing IM_WIDTH_EM Call by reference Type reference (TYPE) I Width in EM 20100419
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED IM_FONTINDEX is not mapped to a font 20100419

Method METRIC_ADD_RANGE_EM_NOCHECK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X Fontindex 20120430
2 Importing IM_UCIX_END Call by reference Type reference (TYPE) I End codepoint 20120430
3 Importing IM_UCIX_START Call by reference Type reference (TYPE) I Start codepoint 20120430
4 Importing IM_WIDTH_EM Call by reference Type reference (TYPE) I Width in EM 20120430
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED IM_FONTINDEX is not mapped to a font 20120430

Method METRIC_ADD_RANGE_PRIV Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X Fontindex 20100419
2 Importing IM_UCIX_END Call by reference Type reference (TYPE) I End codepoint 20100419
3 Importing IM_UCIX_START Call by reference Type reference (TYPE) I Start codepoint 20100419
4 Importing IM_WIDTH_EM Value transfer Type reference (TYPE) I Width in EM 20100419
5 Importing IM_WIDTH_TW Value transfer Type reference (TYPE) I Width in TW 20100419
# Exception Resumable Description Created on
1 FONTINDEX_NOT_MAPPED Fontindex is not known 20100419

Method METRIC_DELETE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_UCIX Call by reference Type reference (TYPE) I Codepoint 20100219

Method METRIC_DELETE on class CL_UPE_FONTMETRIC has no exception.

Method METRIC_MERGE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_ALLOW_OVERWRITE Call by reference Type reference (TYPE) ABAP_BOOL ABAP_FALSE Overwrite in target from source 20120925
2 Importing IM_FONTINDEX Call by reference Type reference (TYPE) X 20120925
3 Importing IM_UCIX Call by reference Type reference (TYPE) I 20120925
4 Importing IM_WIDTH_EM Call by reference Type reference (TYPE) I 20120925
5 Returning RV_MERGE Value transfer Type reference (TYPE) ABAP_BOOL 20120925

Method METRIC_MERGE on class CL_UPE_FONTMETRIC has no exception.

Method METRIC_READ Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_UCIX Call by reference Type reference (TYPE) I Codepoint 20100219
2 Returning RT_CHARMETRIC Value transfer Type reference (TYPE) T_CHARMETRIC Metric of single char 20100219

Method METRIC_READ on class CL_UPE_FONTMETRIC has no exception.

Method MET_EM_TO_TW Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_W_EM Call by reference Type reference (TYPE) I Width EM 20100326
2 Returning RT_W_TW Value transfer Type reference (TYPE) I Width Twip 20100326

Method MET_EM_TO_TW on class CL_UPE_FONTMETRIC has no exception.

Method MET_TW_TO_EM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_W_TW Call by reference Type reference (TYPE) I 20100326
2 Returning RT_W_EM Value transfer Type reference (TYPE) I 20100326

Method MET_TW_TO_EM on class CL_UPE_FONTMETRIC has no exception.

Method OPTIMIZE_RANGES Signature

Method OPTIMIZE_RANGES on class CL_UPE_FONTMETRIC has no parameter.
Method OPTIMIZE_RANGES on class CL_UPE_FONTMETRIC has no exception.

Method SHOWINFO Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_SHOWRANGES Call by reference Type reference (TYPE) C 'X' Show ranges 20100222
2 Importing IM_SHOWSINGLES Call by reference Type reference (TYPE) C SPACE Show single metrics 20100222

Method SHOWINFO on class CL_UPE_FONTMETRIC has no exception.

Method TEXT_TO_METRICS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IM_TEXTTABLE Call by reference Type reference (TYPE) T_TEXTTAB Text representation of metrics 20100219
2 Returning RT_FONTMETRIC Value transfer Object reference (TYPE REF TO) CL_UPE_FONTMETRIC Fontmetrics for UPE 20100219

Method TEXT_TO_METRICS on class CL_UPE_FONTMETRIC has no exception.

Method TTFONT_REPLACE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_FOUND Call by reference Type reference (TYPE) ABAP_BOOL 20121108
2 Exporting EV_HIT_PERCENT Value transfer Type reference (TYPE) I 20121108
3 Importing IM_FONTMAPPING_NEW Call by reference Type reference (TYPE) CL_UPE_FONTMETRIC=>T_FONTMAPREC Mapping of OpenType font to 1-byte number 20121108
4 Importing IM_FONTMAPPING_OLD Call by reference Type reference (TYPE) CL_UPE_FONTMETRIC=>T_FONTMAPREC Mapping of OpenType font to 1-byte number 20121108
5 Importing IO_FONT_NEW Call by reference Object reference (TYPE REF TO) CL_FONT_INSTANCE Instance of font returned through font selector 20121108
6 Importing IV_REPLACE Call by reference Type reference (TYPE) ABAP_BOOL True = replace the font; false = determine the hit percenta 20121108

Method TTFONT_REPLACE on class CL_UPE_FONTMETRIC has no exception.

Method UPDATE_COUNTERS Signature

Method UPDATE_COUNTERS on class CL_UPE_FONTMETRIC has no parameter.
Method UPDATE_COUNTERS on class CL_UPE_FONTMETRIC has no exception.
History
Last changed by/on SAP  20140121 
SAP Release Created in 703