Optimization method and device based on file embedded font

A technology of embedded fonts and optimization methods, which is applied in the fields of electrical digital data processing, instruments, calculations, etc., can solve the problems of large amount of data, increase the amount of document data, etc., to improve processing speed, reduce repeated fonts, and reduce the amount of calculation Effect

Active Publication Date: 2016-04-20
PEKING UNIV +2
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With embedded fonts, the data volume of the document itself will be large. When repeated glyphs appear, the encoding will be repeated, which increases the data volume of the document.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Optimization method and device based on file embedded font
  • Optimization method and device based on file embedded font
  • Optimization method and device based on file embedded font

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] This embodiment provides an optimization method based on embedded fonts in documents, which is used to process format documents with embedded fonts. The flow chart is as follows figure 1 shown, including the following steps:

[0045] S1. Obtain font information of fonts embedded in a document, where the font information includes font names and corresponding font files.

[0046] In this step, the document containing embedded fonts is imported, all pages are traversed, and the font information of all embedded word mentions on each page in the document is extracted. Here, the font information includes the font name and its corresponding font file, such as "Arial" , the corresponding font file is file 1, which stores Song typeface characters ("you", "good", "I", "we").

[0047] The font names of the embedded font tables are combined into multiple font sets to be merged, and each font set may include one or more embedded font data with the same font name but different glyph...

Embodiment 2

[0066] This embodiment provides a specific application example of an optimization method based on embedded fonts in documents, which is used to optimize embedded fonts in documents and delete repeated glyph data in embedded fonts. Including the following three steps, for example corresponding to a certain PDF book, the specific implementation method is as follows:

[0067] The first step, font collection, obtains the font information of the font embedded in the document, and the font information includes the font name and its corresponding font file. Import a book-like PDF document, extract the font information of all text in the entire document, and record the correspondence table between the font name and the font file, for example, font A1 corresponds to the font name "FontA", and the corresponding font file "A1.ttf", font A2 Corresponds to its own name "FontA", corresponding to the font file "A2.ttf", font A3 corresponds to its own name "FontA", corresponding to the font f...

Embodiment 3

[0084] This embodiment provides an optimization device based on embedded fonts in documents, the structural block diagram is as follows Figure 5 shown, including:

[0085] The font collection unit 01 is used to obtain font information of fonts embedded in the document, the font information including font names and corresponding font files;

[0086] Font parsing unit 02, to obtain the glyphs and their attribute information in the font file;

[0087] The font merging unit 03 merges font files with the same font name according to the glyphs and their attribute information.

[0088] Among them, the font merging unit includes:

[0089] Merge the font library to create a subunit, and create a merged font library;

[0090] The font file to be merged obtains the subunit to obtain the font file to be merged;

[0091] The merging subunit judges whether the merged font library is empty, and if the merged font library is empty, adds the glyphs and their attribute information in the f...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides an optimization method and device based on a file embedded font; the method comprises the following steps: obtaining font information of the file embedded font, wherein the font information comprises font names and corresponding font files; obtaining font file font pattern and attribute information thereof; combining font files with same font name according to the font pattern and attribute information thereof. The method collects fonts of same name, and compares font patterns so as to complete repeat font pattern delete and font combination, thus eliminating repeated font patterns in the font, greatly reducing font data and memory size, and improving file display and loading speed.

Description

technical field [0001] The invention relates to the field of document processing, in particular to an optimization method and device based on embedded fonts in documents. Background technique [0002] In documents, in order to ensure the consistency of display on different platforms, font embedding is a widely used technical means. Specifically, part of the font data is extracted from the original font and integrated together to form a new font file. This process is called font embedding, and the resulting new font is the embedded font. Generally speaking, embedded fonts only contain the part of font data required for text display in the document, so that the amount of data is as small as possible. Embedded fonts can be considered as a collection of different fonts, and also include mappings from character codes or font numbers to corresponding fonts. The user can obtain the corresponding font for display through character encoding or font number (index number). But some ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/21
CPCG06F40/109
Inventor 林欣欣徐剑波
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products