CN104850316B - E-book font method of adjustment and device - Google Patents
E-book font method of adjustment and device Download PDFInfo
- Publication number
- CN104850316B CN104850316B CN201510213882.4A CN201510213882A CN104850316B CN 104850316 B CN104850316 B CN 104850316B CN 201510213882 A CN201510213882 A CN 201510213882A CN 104850316 B CN104850316 B CN 104850316B
- Authority
- CN
- China
- Prior art keywords
- font
- body face
- chapters
- sections
- book
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Present disclose provides a kind of e-book font method of adjustment and devices, belong to field of computer technology.The described method includes: determining the body face of e-book, the body face is font used in text in the e-book;Obtain the target font of user's instruction;To the use of the text importing of the body face be the target font in the e-book, and keep in the e-book except it is described use the text of the body face in addition to text font it is constant.The disclosure, which solves the relevant technologies not, allows the user of e-book to be adjusted the font in the e-book, or only support the problem of all fonts in e-book are adjusted to a kind of font, realize intelligent recognition e-book text type, and to the effect that text type is modified, for adjusting e-book font.
Description
Technical field
This disclosure relates to field of computer technology, in particular to a kind of e-book font method of adjustment and device.
Background technique
With constantly universal and mobile Internet the continuous development of intelligent terminal, the use of e-book is more and more general
It and and has been an ignorable demand for the customized of e-book style.
In the related technology, an e-book uses different fonts generally directed to different contents, such as inscription, note
Release, quotation is using regular script, uses black matrix or small tenon Song for title, use Song typeface etc. for normal paragraph.In an electronic chart
After book is according to preset form typesetting, due to technical limitation, it is generally not allowed the user of e-book to the electronic chart
Font in book is adjusted, or only supports all fonts in e-book being adjusted to a kind of font.
Summary of the invention
In order to solve the problems, such as the relevant technologies, present disclose provides a kind of e-book font method of adjustment and devices.Institute
It is as follows to state technical solution:
According to the first aspect of the embodiments of the present disclosure, a kind of e-book font method of adjustment is provided, comprising:
Determine that the body face of e-book, body face are font used in text in e-book;
Obtain the target font of user's instruction;
It is target font by the text importing for using body face in e-book, and keeps removing in e-book and use main word
The font of text except the text of body is constant.
Optionally, the body face of e-book is determined, comprising:
According to the frequency of use of font each in e-book, the body face of e-book is determined.
Optionally, e-book includes at least one chapters and sections, according to the frequency of use of font each in e-book, determines electricity
The body face of subgraph book, comprising:
Using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections;
Determine the highest font of frequency of use in the body face of all chapters and sections;
If the highest font of frequency of use is one kind in the body face of all chapters and sections, it is determined that the body face of all chapters and sections
The middle highest font of frequency of use is the body face of e-book;
If the highest font of frequency of use is at least two in the body face of all chapters and sections, it is determined that the master of intermediate chapters and sections
Font is the body face of e-book, and intermediate chapters and sections are pre- in the chapters and sections in all chapters and sections in addition to first chapters and sections and end chapters and sections
If the chapters and sections of position.
Optionally, each chapters and sections include at least one paragraph, using the highest font of frequency of use in each chapters and sections as every
The body face of a chapters and sections, comprising:
Using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph;
Determine in any chapters and sections the highest font of frequency of use in the body face of all paragraphs;
If the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that the body face of all paragraphs
The middle highest font of frequency of use is the body face of any chapters and sections;
It, will be the of any chapters and sections if the highest font of frequency of use is at least two in the body face of all paragraphs
The body face of one paragraph is determined as the body face of any chapters and sections.
Optionally, each paragraph includes at least one segment, and segment is the identical text of parameter preset in any one
Set,
Using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph, comprising:
Using the highest font of frequency of use in segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the body face of all segments
The middle highest font of frequency of use is the body face of any one;
If the highest font of frequency of use is at least two in the body face of all segments, by the main word of all segments
The font that the highest font of frequency of use uses at first in any one in body is determined as the body face of any one.
Optionally, using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections, comprising:
Preset reference font range is obtained, includes multiple with reference to font with reference to font range, is electronic chart with reference to font
The usual font of text in book;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
It will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as the body face of each chapters and sections.
Optionally, this method further include:
Metadata is generated, metadata is used to indicate the font information of body face.
Optionally, the body face of e-book is determined, comprising:
Preset metadata is obtained, metadata is used to indicate the font information of body face;
The body face of e-book is determined according to metadata.
According to the second aspect of an embodiment of the present disclosure, a kind of e-book font adjustment device is provided, comprising:
Determining module is configured to determine that the body face of e-book, body face are font used in text in e-book;
Module is obtained, is configured as obtaining the target font of user's instruction;
Display module is configured as the text importing of body face is used in e-book being target font, and keeps electricity
The font of text in subgraph book in addition to the text for using body face is constant.
Optionally, determining module, comprising:
Frequency determines submodule, is configured as determining e-book according to the frequency of use of font each in e-book
Body face.
Optionally, e-book includes at least one chapters and sections, and frequency determines submodule, comprising:
Chapters and sections body face determines submodule, is configured as using the highest font of frequency of use in each chapters and sections as each chapter
The body face of section;
Chapters and sections overall frequency determines submodule, is configured to determine that the highest word of frequency of use in the body face of all chapters and sections
Body;
First chapters and sections handle submodule, and being configured as the highest font of frequency of use in the body face of all chapters and sections is one
When kind, determine that the highest font of frequency of use is the body face of e-book in the body face of all chapters and sections;
Second chapter handles submodule, and being configured as the highest font of frequency of use in the body face of all chapters and sections is extremely
When two kinds few, determine that the body face of intermediate chapters and sections is the body face of e-book, intermediate chapters and sections are that first chapter is removed in all chapters and sections
The chapters and sections of predeterminated position in chapters and sections except section and end chapters and sections.
Optionally, each chapters and sections include at least one paragraph, and chapters and sections body face determines submodule, comprising:
Paragraph body face determines submodule, is configured as the highest font of frequency of use in paragraph each in any chapters and sections
Body face as each paragraph;
Paragraph overall frequency determines submodule, is configured to determine that in any chapters and sections in the body face of all paragraphs using frequency
The highest font of rate;
First paragraph handles submodule, and being configured as the highest font of frequency of use in the body face of all paragraphs is one
When kind, determine that the highest font of frequency of use is the body face of any chapters and sections in the body face of all paragraphs;
Second paragraph handles submodule, and being configured as the highest font of frequency of use in the body face of all paragraphs is extremely
When two kinds few, the body face of any chapters and sections will be determined as in the body face of the first of any chapters and sections paragraph.
Optionally, each paragraph includes at least one segment, and segment is the identical text of parameter preset in any one
Set, paragraph body face determine that submodule is configured as:
Using the highest font of frequency of use in segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the body face of all segments
The middle highest font of frequency of use is the body face of any one;
If the highest font of frequency of use is at least two in the body face of all segments, by the main word of all segments
The font that the highest font of frequency of use uses at first in any one in body is determined as the body face of any one.
Optionally, chapters and sections body face determines that submodule is configured as:
Preset reference font range is obtained, includes multiple with reference to font with reference to font range, is electronic chart with reference to font
The usual font of text in book;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
It will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as the body face of each chapters and sections.
Optionally, the device further include:
Generation module, is configurable to generate metadata, and metadata is used to indicate the font information of body face.
Optionally, determining module is configured as:
Preset metadata is obtained, metadata is used to indicate the font information of body face;
The body face of e-book is determined according to metadata.
According to the third aspect of an embodiment of the present disclosure, a kind of e-book font adjustment device is provided, comprising:
Processor;
The memory of executable instruction for storage processor;
Wherein, processor is configured as:
Determine that the body face of e-book, body face are font used in text in e-book;
Obtain the target font of user's instruction;
It is target font by the text importing for using body face in e-book, and keeps removing in e-book and use main word
The font of text except the text of body is constant.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Present disclose provides a kind of e-book font method of adjustment and devices, can be by word used in text in e-book
Body is determined as the body face of e-book, is the target word that user specifies by the text importing for using the body face in e-book
Body, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligent recognition electricity
Subgraph book text type, and to the effect that text type is modified.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
In order to illustrate more clearly of the technical solution in the embodiment of the present disclosure, will make below to required in embodiment description
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present disclosure, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of flow chart of e-book font method of adjustment shown according to an exemplary embodiment;
Fig. 2 is the flow chart of another e-book font method of adjustment shown according to an exemplary embodiment;
Fig. 3 is a kind of schematic diagram for e-book display format that the embodiment of the present disclosure provides;
Fig. 4 is a kind of schematic diagram of the logical model for e-book that the embodiment of the present disclosure provides;
Fig. 5 is a kind of flow chart of the body face method for determining e-book that the embodiment of the present disclosure provides;
Fig. 6 is a kind of using the highest font of frequency of use in each chapters and sections as each chapters and sections of embodiment of the present disclosure offer
Body face method flow chart;
Fig. 7 is that a kind of of embodiment of the present disclosure offer makees the highest font of frequency of use in paragraph each in any chapters and sections
For the flow chart of the body face method of each paragraph;
Fig. 8 is the another kind of embodiment of the present disclosure offer using the highest font of frequency of use in each chapters and sections as each chapter
The flow chart of the body face method of section;
Fig. 9 is the flow chart for the body face method that the another kind that the embodiment of the present disclosure provides determines e-book;
Figure 10 is that a kind of ePub e-book that the embodiment of the present disclosure provides carries out the schematic diagram before font adjustment;
Figure 11 is the flow chart of another e-book font method of adjustment shown according to an exemplary embodiment;
Figure 12 is a kind of body face method of each chapters and sections for determining ePub e-book that the embodiment of the present disclosure provides
Flow chart;
Figure 13 is all paragraphs of a kind of current chapters and sections of circulation ePub e-book that the embodiment of the present disclosure provides, and is determined each
The flow chart of the body face method of paragraph;
Figure 14 is that the ePub e-book shown in Figure 10 carries out font schematic diagram adjusted;
Figure 15 is a kind of structural schematic diagram of e-book font adjustment device shown according to an exemplary embodiment;
Figure 16 is the structural schematic diagram of another e-book font adjustment device shown according to an exemplary embodiment;
Figure 17 is a kind of structural schematic diagram for determining module that the embodiment of the present disclosure provides;
Figure 18 is the structural schematic diagram that a kind of frequency that the embodiment of the present disclosure provides determines submodule;
Figure 19 is the structural schematic diagram that a kind of chapters and sections body face that the embodiment of the present disclosure provides determines submodule;
Figure 20 is a kind of block diagram of device for the adjustment of e-book font shown according to an exemplary embodiment.
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Specific embodiment
To keep the purposes, technical schemes and advantages of the disclosure clearer, below in conjunction with attached drawing to disclosure embodiment party
Formula is described in further detail.
Fig. 1 is a kind of flow chart of e-book font method of adjustment shown according to an exemplary embodiment, the electronics
Books font method of adjustment may include the following steps:
In a step 11, the body face of e-book is determined, which is font used in text in e-book.
In step 12, the target font of user's instruction is obtained.
It is target font by the text importing for using body face in e-book, and keep e-book in step 13
In text in addition to the text for using body face font it is constant.
In conclusion the e-book font method of adjustment that the embodiment of the present disclosure provides, it can be by text in e-book
Font used is determined as the body face of e-book, is what user specified by the text importing for using the body face in e-book
Target font, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligence
Identify e-book text type, and to the effect that text type is modified.
Further, step 11 may include: to determine e-book according to the frequency of use of font each in e-book
Body face.
Optionally, e-book includes at least one chapters and sections, according to the frequency of use of font each in e-book, determines electricity
The body face of subgraph book, comprising:
Using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections;
Determine the highest font of frequency of use in the body face of all chapters and sections;
If the highest font of frequency of use is one kind in the body face of all chapters and sections, it is determined that the body face of all chapters and sections
The middle highest font of frequency of use is the body face of e-book;
If the highest font of frequency of use is at least two in the body face of all chapters and sections, it is determined that the master of intermediate chapters and sections
Font is the body face of e-book, which is in the chapters and sections in all chapters and sections in addition to first chapters and sections and end chapters and sections
The chapters and sections of predeterminated position.
Optionally, each chapters and sections include at least one paragraph, using the highest font of frequency of use in each chapters and sections as every
The body face of a chapters and sections, comprising:
Using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph;
Determine in any chapters and sections the highest font of frequency of use in the body face of all paragraphs;
If the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that the body face of all paragraphs
The middle highest font of frequency of use is the body face of any chapters and sections;
It, will be the of any chapters and sections if the highest font of frequency of use is at least two in the body face of all paragraphs
The body face of one paragraph is determined as the body face of any chapters and sections.
Optionally, each paragraph includes at least one segment, which is the identical text of parameter preset in any one
Set, using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph, comprising:
Using the highest font of frequency of use in segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the body face of all segments
The middle highest font of frequency of use is the body face of any one;
If the highest font of frequency of use is at least two in the body face of all segments, by the main word of all segments
The font that the highest font of frequency of use uses at first in any one in body is determined as the body face of any one.
Optionally, using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections, comprising:
Preset reference font range is obtained, includes multiple with reference to font with reference to font range, this is electronics with reference to font
The usual font of text in books;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
It will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as the body face of each chapters and sections.
Optionally, after step 11, this method comprises: generating metadata, which is used to indicate the word of body face
Body information.
Optionally, step 11 includes:
Preset metadata is obtained, which is used to indicate the font information of body face;
The body face of e-book is determined according to the metadata.
In conclusion the e-book font method of adjustment that the embodiment of the present disclosure provides, it can be by text in e-book
Font used is determined as the body face of e-book, is what user specified by the text importing for using the body face in e-book
Target font, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligence
Identify e-book text type, and to the effect that text type is modified.
Fig. 2 is the flow chart of another e-book font method of adjustment shown according to an exemplary embodiment, the electricity
Subgraph book font method of adjustment may include the following steps:
In step 21, the body face of e-book is determined, which is font used in text in e-book.
The text of one e-book usually has following several classes: text, quotation, explanatory notes, title, inscription etc..Fig. 3 is shown
Associated electrical books enter the interface schematic diagram shown when reading model, exemplary, and 801 in Fig. 3 are text, and 802 be title.
It should be noted that not analyzed the catalogue of e-book usually in the embodiment of the present disclosure.
Other a few occupied ratios of class text are smaller in addition to text under general scenario, while other a few class texts in addition to text
Word occur multi-font collocation probability is larger namely the text of an e-book is usually using a kind of font, and user is most
The number time is all reading the biggish body part of text amount.Font is also known as the style of calligraphy, refers to the style style of text, such as Chinese character hand-written
Regular script, running hand, rapid style of writing.
Font used in body part in e-book is known as the body face of e-book by the embodiment of the present disclosure, because
This, how the body face of customized e-book is key problem.The body face of customized e-book is electric firstly the need of determining
The body face of subgraph book determines that the body face of e-book may include following two aspect:
On the one hand, the body face of e-book can be determined by a kind of algorithm, it such as can be according to each in e-book
The frequency of use of font determines the body face of the e-book.
It should be noted that the chapter construction of an e-book can be carried out according to the catalogue of e-book, ignore electricity
The level of subgraph book planarizes e-book, and the content between every two catalogue is the content of a chapters and sections, associated electrical
Books such as ePub e-book would have been completed the separation of chapters and sections in production, and pass through extensible HyperText Markup Language
(English: The Extensible Hyper Text Markup Language;Mode referred to as: XHTML) forms each
Chapters and sections.XHTML is a kind of markup language, manifestation mode and HyperText Markup Language (English: Hyper Text Mark-up
Language;It is referred to as: HTML) similar, but it is grammatically more stringent.From inheritance, HTML is a kind of based on standard
The application of Universal Markup Language is a kind of very flexible markup language, and XHTML is then based on extensible markup language, can expand
Exhibition markup language is a subset of standard general markup language." hypertext ", which just refers in the page, may include picture, link,
The even non-legible element such as music, program.The structure of XHTML document includes " head " part (English: Head) and " main body " part
(English: Body), wherein " head " portion provides the information about webpage, " main body " part provides the particular content of webpage.Referring to phase
Pass technology it is found that<head>with</head>the two marker characters respectively indicate the beginning and end of header information.Include in head
Label is the title of the page, preamble and the contents such as illustrates, itself shows not as content.<body>with</body>this
Two marker characters respectively indicate the beginning and end of actual content, that is, are used for the main body of definition document.In addition, in XHTML document
Actual content can pass through<p>with</p>marker character is divided into several paragraphs, and each paragraph can pass through<span
>and</span>marker character is divided into several segments.Exemplary, an XHTML document format is as follows:
It should be noted that the e-book whether made with XHTML document, or with other documents such as JSON
(JavaScript Object Notation, javaScript object representation, a kind of storage of lightweight data and exchange lattice
Formula) production e-book, the embodiment of the present disclosure can establish the logical model of the e-book, exemplary a, electronics
The logical model of books may include at least one chapters and sections, each chapters and sections may include at least one paragraph again, and each section
It falls according to the different of parameter preset and may include at least one segment.Exemplary, parameter preset can be font, the face of text
The parameters such as color and font size can then be classified as several segments according to the font of the text of the paragraph content, or can root
Several segments are classified as according to the color of the text of the paragraph content.The embodiment of the present disclosure provides one according to above-mentioned division
The logical model of kind e-book, for the logical model as shown in figure 4,1 e-book may include n chapters and sections, 1 chapters and sections can
To include n paragraph, 1 paragraph may include n segment, wherein n is greater than or equal to 1.Above-mentioned parameter preset can be word
Body, color and font size.By taking the e-book of XHTML document production as an example, the logical model of an e-book includes multiple
XHTML document, the corresponding chapters and sections of each XHTML document, each chapters and sections according to the block grade label in XHTML document (i.e.<p>with
</p>marker character) be divided into multiple paragraphs, each paragraph according to the row interior label in XHTML document (i.e.<span>with</span>
Marker character) multiple segments are divided into, construct logical model shown in Fig. 4.It is therein if there is no row interior label in block grade label
Content forms a segment.
Correspondingly, during determining the body face of e-book, it can be according to electricity provided by the embodiment of the present disclosure
The logical model of subgraph book is searched, and determines that the body face of e-book can determine all segments in any one first
Then the highest font of frequency of use in body face determines that frequency of use is highest in the body face of all paragraphs in any chapters and sections
Font determines the body face of the e-book further according to the highest font of frequency of use in the body face of all chapters and sections.
Optionally, according to the frequency of use of font each in e-book, the body face of e-book is determined, as shown in figure 5,
May include:
In step 211, using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections.
It is exemplary, if the highest font of frequency of use in a certain chapters and sections is regular script, then using regular script as the main word of the chapters and sections
Body.
The e-book font method of adjustment that the embodiment of the present disclosure provides can be according in the expression document of e-book
Block grade label is (in such as XHTML<p>with</p>marker character) determine paragraph, according to row interior label (in such as XHTML<span>with
</span>marker character) determine segment.
Optionally, each chapters and sections may include at least one paragraph, then step 211 is as shown in Figure 6, comprising:
In step 2111, using the highest font of frequency of use in paragraph each in any chapters and sections as the master of each paragraph
Font.
Exemplary, there are five paragraphs in a certain chapters and sections, and five highest fonts of paragraph frequency of use are respectively regular script, Song
Body, black matrix, regular script and Microsoft are refined black, then the body face of five paragraphs in the chapters and sections is respectively regular script, the Song typeface, black matrix, regular script
It is refined black with Microsoft.
Further, each paragraph gives certain contents to add unique pattern if necessary, it is also desirable to the mark of display be added
Note, as XHTML can be with one segment of row interior label label.Since each paragraph may include at least one segment, then step
2111 as shown in fig. 7, comprises:
In step 2111a, using the highest font of frequency of use in segment each in any one as each segment
Body face.
As described above, each paragraph includes at least one segment according to the difference of parameter preset, it is assumed that parameter preset is
When the color of text, then when previous paragraphs are divided into three segments according to text color, the text color of the first segment is red, and second
The text color of segment is blue, and the text color of third segment is black, and the highest font of frequency of use in the first segment
For black matrix, the highest font of frequency of use is regular script in the second segment, and the highest font of frequency of use is the Song typeface in third segment,
Then the body face of the first segment is black matrix, and the body face of the second segment is regular script, and the body face of third segment is the Song typeface.
In step 2111b, the highest font of frequency of use in the body face of all segments is determined in any one.
In step 2111c, if the highest font of frequency of use is one kind in the body face of all segments, it is determined that institute
Having the highest font of frequency of use in the body face of segment is the body face of any one.
It, will if the highest font of frequency of use is at least two in the body face of all segments in step 2111d
The font that the highest font of frequency of use uses at first in any one in the body face of all segments is determined as any one
Body face.
In step 2112, the highest font of frequency of use in the body face of all paragraphs is determined in any chapters and sections.
In step 2113, if the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that institute
Having the highest font of frequency of use in the body face of paragraph is the body face of any chapters and sections.
It, will if the highest font of frequency of use is at least two in the body face of all paragraphs in step 2114
It is determined as the body face of any chapters and sections in the body face of first paragraph of any chapters and sections.
In mobile internet era, e-book needs are presented on the display screen of intelligent terminal, and font is on a display screen
Presentation text appearance whether can by user for a long time receive be determine its can be used as body face key factor.Such as pattern
The more inclined handwritten form of body is all seldom used as body face in paper book publication;Small tenon Song's stroke is excessively thick, is typically used as title,
Seldom it is used as body face;Imitation Song-Dynasty-style typeface stroke is meticulous, more obvious in the not high display on-screen pixels sense of clarity.Therefore, in order to
The accuracy that body face determines is improved, can be arranged one for the body face of e-book includes multiple reference fonts with reference to font
Range, and including it is multiple with reference to font be e-book in text usual font, such as Song being commonly used in paper publication
Body, computer or can terminal the black matrix that is commonly used of operating system, wire bodies such as effect is preferable in high clear screen etc..In this way, step
Rapid 211 as shown in Figure 8, comprising:
In step 21101, obtaining preset includes multiple with reference to font with reference to font range with reference to font range, should
It is the usual font of text in e-book with reference to font.
It is exemplary, it may include the Song typeface, black matrix with reference to font range and wait wire bodies.
In step 21102, the use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections is counted
Frequency.
In step 21103, it will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as every
The body face of a chapters and sections.
In the step 212, the highest font of frequency of use in the body face of all chapters and sections is determined.
In step 213, if the highest font of frequency of use is one kind in the body face of all chapters and sections, it is determined that all
The highest font of frequency of use is the body face of e-book in the body face of chapters and sections.
In step 214, if the highest font of frequency of use is at least two in the body face of all chapters and sections, it is determined that
The body face of intermediate chapters and sections is the body face of e-book, which is that first chapters and sections and end chapters and sections are removed in all chapters and sections
Except chapters and sections in predeterminated position chapters and sections.
On the other hand, the producer of e-book can set when making in e-book to the e-book
The metadata of body face is set, which is used to indicate the font information of the body face, and user equipment passes through the first number set
According to come the information that obtains body face.Metadata, also known as broker data, relaying data, are the data about data, mainly describe
The information of data attribute, for supporting such as to indicate storage location, historical data, resource lookup, file record function, related skill
Art can not determine the body part in e-book, thus also can not font used in body part, there is no body faces
Less there is the metadata for the font information for being used to indicate body face in concept.
Optionally, as shown in figure 9, step 21 includes:
In step 21a, preset metadata is obtained, which is used to indicate the font information of body face.
In step 21b, the body face of e-book is determined according to metadata.
Since the font that e-book text uses is determined by the producer of e-book, by producer
Member's setting body face is not only efficiently but also accurate.
In step 22, metadata is generated, which is used to indicate the font information of body face.
After carrying out the body face of determining e-book in real time according to the algorithm of step 21, it can will be used in e-book
The text importing of body face is the target font of user's instruction, but in order to reduce cost, is made in customized e-book next time
Body face it is more convenient, the body face of the e-book after determination can also be write back into the electronics in a manner of metadata
In books.
In step 23, the target font of user's instruction is obtained.
User can specify customized font, i.e. target font according to personal preference and reading environment etc..It is exemplary,
The target font that user specifies can be refined black etc. for the Song typeface, regular script, black matrix and Microsoft.
In step 24, it is target font by the text importing for using body face in e-book, and keeps e-book
In text in addition to the text for using body face font it is constant.
According to step 21, it is determined that after the body face of e-book, the text of body face will be used to show in e-book
It is shown as the target font of user's instruction, user is the body face that can customize e-book, achieve the purpose that font personalization, and
Keep the font of the text in e-book in addition to the text for using body face constant.Such as one used the Song typeface as
The e-book of body face (font used in text), when can carry out real-time typesetting to e-book, by the font of the Song typeface
Target font --- the black matrix for replacing with user's instruction equally uses black matrix to carry out the drafting of text when e-book is presented,
Meanwhile explanatory notes, annotation and title etc. all keep raw font constant.It should be noted that typesetting, refers to text, picture, figure
The visual informations element such as shape adjusts position, size in layout, makes the process of layout's methodization of e-book.
Exemplary, e-book is there are three chapters and sections, and the target font of user's instruction such as is at wire bodies, each of the e-book
The case where font that the segment and each segment that paragraph that chapters and sections include, each paragraph include use, is as shown in table 1:
Table 1
As shown in Table 1, the first highest font of paragraph frequency of use of the first chapters and sections of the e-book is black matrix, then the
The body face of first paragraph of one chapters and sections is black matrix;The second highest font of paragraph frequency of use of the first chapters and sections is the Song typeface, then
The body face of second paragraph of second chapter is the Song typeface.Due to frequency of use highest in the body face of two paragraphs of the first chapters and sections
Font be two kinds, then the body face of the first chapters and sections be the first paragraph body face --- black matrix.
The first highest font of paragraph frequency of use of the second chapter of the e-book is the Song typeface, then the of second chapter
The body face of one paragraph is the Song typeface;Since three highest fonts of segment frequency of use of the second paragraph of second chapter are Song
The Song typeface used at first is then determined as the body face of the second paragraph of second chapter by body, black matrix and regular script, then second chapter
Body face is the Song typeface.
The first highest font of paragraph frequency of use of third chapters and sections is regular script, then the main word of the first paragraph of third chapters and sections
Body is regular script;The second highest font of paragraph frequency of use of third chapters and sections is the Song typeface, then the master of the second paragraph of third chapters and sections
Font is the Song typeface;The highest fonts of third paragraph frequency of use of third chapters and sections is black matrix, then the third paragraph of third chapters and sections
Body face is black matrix.Since the highest font of frequency of use is three kinds in the body face of three paragraphs of third chapters and sections, then third
The body face of chapters and sections is body face --- the regular script of the first paragraph.
Since the body face of the first chapters and sections is black matrix, the body face of second chapter is the Song typeface, and the body face of third chapters and sections is
Regular script, the highest font of frequency of use is three kinds in the body face of three chapters and sections, then the body face of the e-book is intermediate chapter
Section is body face --- the Song typeface of second chapter.
In order to improve the accuracy that body face determines, it is assumed that for the reference font range of the body face setting of the e-book
For black matrix and the Song typeface, then during the body face of the above-mentioned determining e-book, the body face of the first chapters and sections is constant, is still
Black matrix;Since the highest font of third segment frequency of use of the second paragraph of second chapter is regular script, regular script is not belonging to refer to
Within the scope of font, therefore, the highest font of frequency of use of the second paragraph of second chapter is the Song typeface and black matrix, second chapter
Body face is the Song typeface;Since the highest font regular script of the first paragraph frequency of use of third chapters and sections is not belonging to reference to font range
Interior, the second paragraph and the highest font of third paragraph frequency of use belong to reference within the scope of font, therefore, can be according to chapter 3
Body face can be determined according to the body face of the second paragraph of chapter 3 and third paragraph, it can be seen from the above, chapter 3
Body face is the Song typeface.Therefore, the body face of the e-book is body face --- the Song typeface of intermediate chapters and sections, that is, second chapter.It proposes
Reference font range can further reduce the number for counting font frequency of use in each chapters and sections of each chapters and sections.
After the body face (i.e. the Song typeface) for determining the e-book, in order to reduce cost, first number of the instruction Song typeface is generated
According to so that the body face in customized e-book next time is more convenient.
Finally, will in e-book using the Song typeface text importing be etc. wire bodies, and keep e-book in except use Song
The font of text except the text of body is constant.
As most popular one of e-book, ePub is a kind of e-book format based on XML, goes out plate structure
By the Cascading Style Sheet (English: Cascading Style Sheet of W3C;Referred to as: CSS) tied with XHTML specification description, publication
The bookbinding structure of structure opens packaging format (English: Open Packaging Format by it;Referred to as: OPF) specification description, object
The packaging structure of file is managed by its open container format (English: Open Container Format;Referred to as: OCF) specification is retouched
It states.Wherein, CSS is can be truly realized webpage to show a kind of form design language separated with content.Relative to conventional HTML
Performance for, CSS can position typesetting to the object in webpage carry out the accurate control of Pixel-level, support almost all of
Font size pattern possesses the ability to web object and model pattern editor, and is able to carry out preliminary interaction design.
The embodiment of the present disclosure carries out the e-book font method of adjustment by taking a certain e-book of ePub format as an example
It is described in detail.Assuming that current time user reads the e-book by user equipment (such as mobile phone), Figure 10 shows the ePub
E-book carries out the schematic diagram before font adjustment.Include the Song typeface, black matrix with reference to font range and wait three kinds of wire bodies, Figure 11 is root
According to the flow chart of another e-book font method of adjustment shown in an exemplary embodiment, the e-book font adjustment side
Method may include the following steps:
In step 301, the parsing of bookbinding structure is carried out to it according to ePub format specification, obtains ePub e-book
The XHTML text of each chapters and sections.
In step 302, the preset reference font range of acquisition, all chapters and sections of chaining search ePub e-book, really
The body face of fixed each chapters and sections.
Optionally, step 302 is as shown in figure 12, comprising:
In step 3021, parsing is carried out using the XML parser of standard to the XHTML text of current chapters and sections and forms label
Tree.
In step 3022, the logical model of current chapters and sections is constructed to the traversal that the tag tree of generation carries out depth-first.
The CSS style for completing current label in ergodic process first is searched, to obtain the font use information of current label;
Secondly (such as according to block grade label<p>with</p>marker character) form paragraph, row interior label (such as<span>with</span>marker character)
Form the principle construction logical model of segment.If without any label in block grade label, content therein forms a segment.
In step 3023, all paragraphs of current chapters and sections are recycled, determine the body face of each paragraph.
Optionally, step 3023 is as shown in figure 13, comprising:
In step 3023a, circulation works as all segments of previous paragraphs, the font that each segment uses is determined, if it is being joined
It examines within the scope of font, then retains, otherwise skip.
In step 3023b, if the highest font of frequency of use is one kind in the body face of all segments, it is determined that institute
Having the highest font of frequency of use in the body face of segment is the body face when previous paragraphs;Otherwise, by the body face of all segments
The middle highest font of frequency of use is being determined as the body face when previous paragraphs when the font used at first in previous paragraphs.
In step 3024, if the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that institute
Having the highest font of frequency of use in the body face of paragraph is the body face of current chapters and sections;It otherwise, will be the first of current chapters and sections
The body face of a paragraph is determined as the body face of current chapters and sections.
In step 303, if the highest font of frequency of use is one kind in the body face of all chapters and sections, it is determined that all
The highest font of frequency of use is the body face of current ePub e-book in the body face of chapters and sections;Otherwise, by intermediate chapters and sections
Body face is the body face of current ePub e-book.
It should be noted that intermediate chapters and sections are usually the body part of ePub e-book.
It is the body face that can determine ePub e-book according to above-mentioned steps.
In step 304, metadata is generated, which is used to indicate the font information of body face.
In step 305, the target font of user's instruction is obtained.
Within step 306, it is target font by the text importing for using body face in current ePub e-book, and keeps
The font of text in current ePub e-book in addition to the text for using body face is constant.
The relevant technologies can not determine the body part in e-book, thus also can not font used in body part,
There is no the concepts of body face, therefore the data that less there is the font information for being used to indicate body face in the related technology can not
Realize the lookup and replacement of the text shown using body face, and in the embodiment of the present disclosure, it can be by determining body face, then
Original text show using body face is shown using target font, the lookup of the text for using body face to show is realized and replaces
It changes.It is exemplary, it is assumed that it is black matrix that body face is used in current ePub e-book, and the target font that user specifies is regular script, that
As shown in figure 14 to current ePub e-book progress font schematic diagram adjusted, 140 in Figure 14 and Figure 10 indicate to work as
The text that body face is used in preceding ePub e-book, 140 font before adjustment is black matrix, and adjusted 140 font is
Regular script.As can be seen that the e-book font method of adjustment makes user in read electronic books, the big portion for both having read user
Single cent word shows for the black matrix of user's habit, that is, meets demand of the user to e-book custom font, and without broken
Bad original font collocation saves the original font collocation of e-book to the maximum extent, has reached user demand and protected
Protect the balance between the creation of e-book producer.
It should be noted that the sequencing for the e-book font method of adjustment step that the embodiment of the present disclosure provides can be with
Appropriate adjustment is carried out, step according to circumstances can also accordingly be increased and decreased, and anyone skilled in the art is at this
In the open technical scope disclosed, the method that can readily occur in variation should all cover within the protection scope of the disclosure, therefore
It repeats no more.
In conclusion the e-book font method of adjustment that the embodiment of the present disclosure provides, it can be by text in e-book
Font used is determined as the body face of e-book, is what user specified by the text importing for using the body face in e-book
Target font, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligence
Identify e-book text type, and to the effect that text type is modified.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device
Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Figure 15 is a kind of structural schematic diagram of e-book font adjustment device shown according to an exemplary embodiment, should
Device 50 may include:
Determining module 1501 is configured to determine that the body face of e-book, which is text institute in e-book
Use font.
Module 1502 is obtained, is configured as obtaining the target font of user's instruction.
Display module 1503 is configured as the text importing of body face is used in e-book being target font, and protects
The font for holding the text in e-book in addition to the text for using body face is constant.
In conclusion the e-book font that the embodiment of the present disclosure provides adjusts device, it can be by text in e-book
Font used is determined as the body face of e-book, is what user specified by the text importing for using the body face in e-book
Target font, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligence
Identify e-book text type, and to the effect that text type is modified.
Figure 16 is the structural schematic diagram of another e-book font adjustment device shown according to an exemplary embodiment
This, which may include:
Determining module 1501 is configured to determine that the body face of e-book, which is text institute in e-book
Use font.
Module 1502 is obtained, is configured as obtaining the target font of user's instruction.
Display module 1503 is configured as the text importing of body face is used in e-book being target font, and protects
The font for holding the text in e-book in addition to the text for using body face is constant.
Generation module 1504, is configurable to generate metadata, which is used to indicate the font information of the body face.
Wherein it is determined that module 1501 is as shown in figure 17, comprising:
Frequency determines submodule 15011, is configured as determining electronic chart according to the frequency of use of font each in e-book
The body face of book.
Optionally, e-book includes at least one chapters and sections, and frequency determines submodule 15011, as shown in figure 18, comprising:
Chapters and sections body face determines submodule 180, is configured as using the highest font of frequency of use in each chapters and sections as every
The body face of a chapters and sections.
Chapters and sections overall frequency determines submodule 181, is configured to determine that frequency of use highest in the body face of all chapters and sections
Font.
First chapters and sections handle submodule 182, are configured as the highest font of frequency of use in the body face of all chapters and sections
When being a kind of, determine that the highest font of frequency of use is the body face of e-book in the body face of all chapters and sections.
Second chapter handles submodule 183, is configured as the highest font of frequency of use in the body face of all chapters and sections
When being at least two, determine that the body face of intermediate chapters and sections is the body face of e-book, which is to remove in all chapters and sections
The chapters and sections of predeterminated position in chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections include at least one paragraph, and chapters and sections body face determines submodule 180, as shown in figure 19, packet
It includes:
Paragraph body face determines submodule 1801, is configured as frequency of use in paragraph each in any chapters and sections is highest
Body face of the font as each paragraph.
Paragraph overall frequency determines submodule 1802, and being configured to determine that in any chapters and sections makes in the body face of all paragraphs
With the highest font of frequency.
First paragraph handles submodule 1803, is configured as the highest font of frequency of use in the body face of all paragraphs
When being a kind of, determine that the highest font of frequency of use is the body face of any chapters and sections in the body face of all paragraphs.
Second paragraph handles submodule 1804, is configured as the highest font of frequency of use in the body face of all paragraphs
When being at least two, the body face of any chapters and sections will be determined as in the body face of the first of any chapters and sections paragraph.
Optionally, each paragraph includes at least one segment, and segment is the identical text of parameter preset in any one
Set, paragraph body face determine that submodule 1801 is configured as:
Using the highest font of frequency of use in segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the body face of all segments
The middle highest font of frequency of use is the body face of any one;
If the highest font of frequency of use is at least two in the body face of all segments, by the main word of all segments
The font that the highest font of frequency of use uses at first in any one in body is determined as the body face of any one.
Optionally, chapters and sections body face determines that submodule 180 is configured as:
Preset reference font range is obtained, includes multiple with reference to font with reference to font range, this is electronics with reference to font
The usual font of text in books;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections.
It will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as the body face of each chapters and sections.
Optionally, determining module 1501 is configured as:
Preset metadata is obtained, which is used to indicate the font information of the body face;
The body face of e-book is determined according to metadata.
In conclusion the e-book font that the embodiment of the present disclosure provides adjusts device, it can be by text in e-book
Font used is determined as the body face of e-book, is what user specified by the text importing for using the body face in e-book
Target font, and the font of the text in holding e-book in addition to the text for using body face is constant, can be realized intelligence
Identify e-book text type, and to the effect that text type is modified.
Figure 20 is a kind of frame of device 500 for the adjustment of e-book font shown according to an exemplary embodiment
Figure.For example, device 500 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console put down
Panel device, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Figure 20, device 500 may include following one or more components: processing component 5002, memory 5004, electricity
Source component 5006, multimedia component 5008, audio component 5010, the interface 5012 of input/output (I/O), sensor module
5014 and communication component 5016.
The integrated operation of the usual control device 500 of processing component 5002, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 5002 may include that one or more processors 5020 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 5002 may include one or more modules,
Convenient for the interaction between processing component 5002 and other assemblies.For example, processing component 5002 may include multi-media module, with side
Just the interaction between multimedia component 5008 and processing component 5002.
Memory 5004 is configured as storing various types of data to support the operation in device 500.These data
Example includes the instruction of any application or method for operating on device 500, contact data, telephone book data,
Message, picture, video etc..Memory 5004 can by any kind of volatibility or non-volatile memory device or they
Combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), it is erasable can
Program read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory
Reservoir, disk or CD.
Power supply module 5006 provides electric power for the various assemblies of device 500.Power supply module 5006 may include power management
System, one or more power supplys and other with for device 500 generate, manage, and distribute the associated component of electric power.
Multimedia component 5008 includes the screen of one output interface of offer between described device 500 and user.?
In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel,
Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes
Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic
The boundary of work, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more
Media component 5008 includes a front camera and/or rear camera.When device 500 is in operation mode, as shot mould
When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting
Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 5010 is configured as output and/or input audio signal.For example, audio component 5010 includes a wheat
Gram wind (MIC), when device 500 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone quilt
It is configured to receive external audio signal.The received audio signal can be further stored in memory 5004 or via communication
Component 5016 is sent.In some embodiments, audio component 5010 further includes a loudspeaker, is used for output audio signal.
I/O interface 5012 provides interface, above-mentioned peripheral interface module between processing component 5002 and peripheral interface module
It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and
Locking press button.
Sensor module 5014 includes one or more sensors, and the state for providing various aspects for device 500 is commented
Estimate.For example, sensor module 5014 can detecte the state that opens/closes of device 500, the relative positioning of component, such as institute
The display and keypad that component is device 500 are stated, sensor module 5014 can be with detection device 500 or 500 1, device
The position change of component, the existence or non-existence that user contacts with device 500,500 orientation of device or acceleration/deceleration and device
500 temperature change.Sensor module 5014 may include proximity sensor, be configured in not any physical contact
When detect the presence of nearby objects.Sensor module 5014 can also include optical sensor, such as CMOS or ccd image sensor,
For being used in imaging applications.In some embodiments, which can also include acceleration transducer, top
Spiral shell instrument sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 5016 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Dress
The wireless network based on communication standard, such as WiFi can be accessed by setting 500,2G or 3G or their combination.In an exemplary reality
It applies in example, communication component 5016 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel
Breath.In one exemplary embodiment, the communication component 5016 further includes near-field communication (NFC) module, to promote short distance logical
Letter.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) can be based in NFC module
Technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 5004 of instruction, above-metioned instruction can be executed by the processor 5020 of device 500 to complete the above method.Example
Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft
Disk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of device 500
When device executes, so that device 500 is able to carry out a kind of e-book font method of adjustment, which comprises
Determine the body face of e-book, which is font used in text in e-book;
Obtain the target font of user's instruction;
It is target font by the text importing for using body face in e-book, and keeps removing in e-book and use main word
The font of text except the text of body is constant.
Optionally, the body face of e-book is determined, comprising:
According to the frequency of use of font each in e-book, the body face of e-book is determined.
Optionally, e-book includes at least one chapters and sections, according to the frequency of use of font each in e-book, determines electricity
The body face of subgraph book, comprising:
Using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections;
Determine the highest font of frequency of use in the body face of all chapters and sections;
If the highest font of frequency of use is one kind in the body face of all chapters and sections, it is determined that the body face of all chapters and sections
The middle highest font of frequency of use is the body face of e-book;
If the highest font of frequency of use is at least two in the body face of all chapters and sections, it is determined that the master of intermediate chapters and sections
Font is the body face of e-book, and intermediate chapters and sections are pre- in the chapters and sections in all chapters and sections in addition to first chapters and sections and end chapters and sections
If the chapters and sections of position.
Optionally, each chapters and sections include at least one paragraph, using the highest font of frequency of use in each chapters and sections as every
The body face of a chapters and sections, comprising:
Using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph;
Determine in any chapters and sections the highest font of frequency of use in the body face of all paragraphs;
If the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that the body face of all paragraphs
The middle highest font of frequency of use is the body face of any chapters and sections;
It, will be the of any chapters and sections if the highest font of frequency of use is at least two in the body face of all paragraphs
The body face of one paragraph is determined as the body face of any chapters and sections.
Optionally, each paragraph includes at least one segment, and segment is the identical text of parameter preset in any one
Set,
Using the highest font of frequency of use in paragraph each in any chapters and sections as the body face of each paragraph, comprising:
Using the highest font of frequency of use in segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the body face of all segments
The middle highest font of frequency of use is the body face of any one;
If the highest font of frequency of use is at least two in the body face of all segments, by the main word of all segments
The font that the highest font of frequency of use uses at first in any one in body is determined as the body face of any one.
Optionally, using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections, comprising:
Preset reference font range is obtained, includes multiple with reference to font with reference to font range, this is electronics with reference to font
The usual font of text in books;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
It will belong in each chapters and sections with reference to font range and the highest font of frequency of use be as the body face of each chapters and sections.
Optionally, method further include:
Metadata is generated, metadata is used to indicate the font information of body face.
Optionally, the body face of e-book is determined, comprising:
Preset metadata is obtained, metadata is used to indicate the font information of body face;
The body face of e-book is determined according to metadata.
In conclusion the device for the adjustment of e-book font that the embodiment of the present disclosure provides, it can be by e-book
Font used in middle text is determined as the body face of e-book, is user by the text importing for using the body face in e-book
Specified target font, and the font of the text in holding e-book in addition to the text for using body face is constant, Neng Goushi
Existing intelligent recognition e-book text type, and to the effect that text type is modified.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
It with the specific work process of module, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all spirit in the disclosure and
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the protection scope of the disclosure.
Claims (10)
1. a kind of e-book font method of adjustment, which is characterized in that be applied to mobile phone, digital broadcast terminal, message and receive
It sends out in equipment, game console, tablet device, Medical Devices, body-building equipment or personal digital assistant, comprising:
Determine that the body face of e-book, the body face are font used in text in the e-book;
Obtain the target font of user's instruction;
When carrying out real-time typesetting to the e-book, will be replaced in the e-book using the text of the body face
The target font is carried out the drafting of text using the target font when the e-book is presented, and keeps the electricity
In subgraph book except it is described use the text of the body face in addition to text font it is constant;
The body face of the determining e-book, comprising:
The e-book includes at least one chapters and sections, using the highest font of frequency of use in each chapters and sections as each institute
State the body face of chapters and sections;Determine the highest font of frequency of use in the body face of all chapters and sections;If the master of all chapters and sections
The highest font of frequency of use is one kind in font, it is determined that the highest font of frequency of use in the body face of all chapters and sections
For the body face of the e-book;If the highest font of frequency of use is at least two in the body face of all chapters and sections
Kind, it is determined that the body face of intermediate chapters and sections is the body face of the e-book, and the intermediate chapters and sections are in all chapters and sections
The chapters and sections of predeterminated position in chapters and sections in addition to first chapters and sections and end chapters and sections.
2. the method according to claim 1, wherein each chapters and sections include at least one paragraph, it is described will
Body face of the highest font of frequency of use as each chapters and sections in each chapters and sections, comprising:
Using the highest font of frequency of use in the paragraph each in any chapters and sections as the body face of each paragraph;
Determine in any chapters and sections the highest font of frequency of use in the body face of all paragraphs;
If the highest font of frequency of use is one kind in the body face of all paragraphs, it is determined that the master of all paragraphs
The highest font of frequency of use is the body face of any chapters and sections in font;
If the highest font of frequency of use is at least two in the body face of all paragraphs, will be in any chapters and sections
The body face of first paragraph be determined as the body faces of any chapters and sections.
3. according to the method described in claim 2, it is characterized in that, each paragraph includes at least one segment, described
Section is the set of the identical text of parameter preset in any one,
It is described using the highest font of frequency of use in the paragraph each in any chapters and sections as the body face of each paragraph,
Include:
Using the highest font of frequency of use in the segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the master of all segments
The highest font of frequency of use is the body face of any one in font;
If the highest font of frequency of use is at least two in the body face of all segments, by all segments
The font that the highest font of frequency of use uses at first in any one in body face is determined as any one
Body face.
4. the method according to claim 1, wherein described by the highest word of frequency of use in each chapters and sections
Body face of the body as each chapters and sections, comprising:
Obtain it is preset refer to font range, described with reference to font range includes multiple with reference to font, and described with reference to font is electricity
The usual font of text in subgraph book;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
The reference font range and the highest font of frequency of use will be belonged in each chapters and sections as each chapters and sections
Body face.
5. a kind of e-book font adjusts device, which is characterized in that be applied to mobile phone, digital broadcast terminal, message and receive
It sends out in equipment, game console, tablet device, Medical Devices, body-building equipment or personal digital assistant, comprising:
Determining module is configured to determine that the body face of e-book, and the body face is used in text in the e-book
Font;
Module is obtained, is configured as obtaining the target font of user's instruction;
Display module is configured as when carrying out real-time typesetting to the e-book, described by using in the e-book
The text of body face replaces with the target font, carries out text using the target font when the e-book is presented
Draw, and keep in the e-book except it is described use the text of the body face in addition to text font it is constant;
The determining module, including chapters and sections body face determine that submodule, chapters and sections overall frequency determine submodule, the processing of the first chapters and sections
Submodule and second chapter handle submodule, and it includes extremely that the chapters and sections body face, which determines that submodule is configured as the e-book,
Few chapters and sections, using the highest font of frequency of use in each chapters and sections as the body face of each chapters and sections;The chapter
Section overall frequency determines submodule, is configured to determine that the highest font of frequency of use in the body face of all chapters and sections;Described
One chapters and sections handle submodule, when to be configured as in the body face of all chapters and sections the highest font of frequency of use be a kind of,
Determine that the highest font of frequency of use is the body face of the e-book in the body face of all chapters and sections;Described chapter 2
Section processing submodule, when to be configured as in the body face of all chapters and sections the highest font of frequency of use be at least two,
The body face for determining intermediate chapters and sections is the body face of the e-book, and the intermediate chapters and sections are in all chapters and sections except first
The chapters and sections of predeterminated position in chapters and sections except chapters and sections and end chapters and sections.
6. device according to claim 5, which is characterized in that each chapters and sections include at least one paragraph, the chapter
Section body face determines submodule, comprising:
Paragraph body face determines submodule, is configured as the highest font of frequency of use in the paragraph each in any chapters and sections
Body face as each paragraph;
Paragraph overall frequency determines submodule, is configured to determine that in any chapters and sections in the body face of all paragraphs using frequency
The highest font of rate;
First paragraph handles submodule, and being configured as the highest font of frequency of use in the body face of all paragraphs is one
When kind, determine that the highest font of frequency of use is the body face of any chapters and sections in the body face of all paragraphs;
Second paragraph handles submodule, and being configured as the highest font of frequency of use in the body face of all paragraphs is extremely
When two kinds few, the body face of any chapters and sections will be determined as in the body face of first paragraph of any chapters and sections.
7. device according to claim 6, which is characterized in that each paragraph includes at least one segment, and described
Section is the set of the identical text of parameter preset in any one, and the paragraph body face determines that submodule is configured as:
Using the highest font of frequency of use in the segment each in any one as the body face of each segment;
Determine in any one the highest font of frequency of use in the body face of all segments;
If the highest font of frequency of use is one kind in the body face of all segments, it is determined that the master of all segments
The highest font of frequency of use is the body face of any one in font;
If the highest font of frequency of use is at least two in the body face of all segments, by all segments
The font that the highest font of frequency of use uses at first in any one in body face is determined as any one
Body face.
8. device according to claim 5, which is characterized in that the chapters and sections body face determines that submodule is configured as:
Obtain it is preset refer to font range, described with reference to font range includes multiple with reference to font, and described with reference to font is electricity
The usual font of text in subgraph book;
Count the frequency of use for belonging to the font with reference to font range in each chapters and sections in each chapters and sections;
The reference font range and the highest font of frequency of use will be belonged in each chapters and sections as each chapters and sections
Body face.
9. a kind of e-book font adjusts device, which is characterized in that be applied to mobile phone, digital broadcast terminal, message and receive
It sends out in equipment, game console, tablet device, Medical Devices, body-building equipment or personal digital assistant, comprising:
Processor;
For storing the memory of the executable instruction of the processor;
Wherein, the processor is configured to:
Determine that the body face of e-book, the body face are font used in text in the e-book;
Obtain the target font of user's instruction;
When carrying out real-time typesetting to the e-book, will be replaced in the e-book using the text of the body face
The target font is carried out the drafting of text using the target font when the e-book is presented, and keeps the electricity
In subgraph book except it is described use the text of the body face in addition to text font it is constant;
The body face of the determining e-book, comprising:
The e-book includes at least one chapters and sections, using the highest font of frequency of use in each chapters and sections as each institute
State the body face of chapters and sections;Determine the highest font of frequency of use in the body face of all chapters and sections;If the master of all chapters and sections
The highest font of frequency of use is one kind in font, it is determined that the highest font of frequency of use in the body face of all chapters and sections
For the body face of the e-book;If the highest font of frequency of use is at least two in the body face of all chapters and sections
Kind, it is determined that the body face of intermediate chapters and sections is the body face of the e-book, and the intermediate chapters and sections are in all chapters and sections
The chapters and sections of predeterminated position in chapters and sections in addition to first chapters and sections and end chapters and sections.
10. a kind of computer readable storage medium, instruction is stored on the computer readable storage medium, which is characterized in that
The step of any one of claim 1-4 the method is realized when described instruction is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510213882.4A CN104850316B (en) | 2015-04-29 | 2015-04-29 | E-book font method of adjustment and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510213882.4A CN104850316B (en) | 2015-04-29 | 2015-04-29 | E-book font method of adjustment and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104850316A CN104850316A (en) | 2015-08-19 |
CN104850316B true CN104850316B (en) | 2019-02-12 |
Family
ID=53849996
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510213882.4A Active CN104850316B (en) | 2015-04-29 | 2015-04-29 | E-book font method of adjustment and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104850316B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106776487A (en) * | 2015-11-23 | 2017-05-31 | 北大方正集团有限公司 | Electronic publication trailing and device |
CN106970897A (en) * | 2017-04-05 | 2017-07-21 | 北京小米移动软件有限公司 | The method to set up and equipment of text formatting |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239282A (en) * | 2014-09-09 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Processing method and device for electronic book |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001043212A (en) * | 1999-07-23 | 2001-02-16 | Internatl Business Mach Corp <Ibm> | Method for normalizing character information in electronic document |
CN101923535A (en) * | 2009-06-11 | 2010-12-22 | 盛大计算机(上海)有限公司 | Method for processing word size of rich text formatted file |
CN102103574B (en) * | 2009-12-17 | 2013-04-24 | 北大方正集团有限公司 | Method and system for formatting output of book sample file content |
CN101876967B (en) * | 2010-03-25 | 2012-05-02 | 深圳市万兴软件有限公司 | Method for generating PDF text paragraphs |
-
2015
- 2015-04-29 CN CN201510213882.4A patent/CN104850316B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239282A (en) * | 2014-09-09 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Processing method and device for electronic book |
Also Published As
Publication number | Publication date |
---|---|
CN104850316A (en) | 2015-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6457655B2 (en) | Method, apparatus, program, and recording medium for creating graphical user interface | |
US10452747B2 (en) | Dynamically formatting scalable vector graphics | |
CN103348338A (en) | File format, server, view device for digital comic, digital comic generation device | |
CN103339622A (en) | Electronic comic viewer device, electronic comic reading system, viewer program, recording medium having viewer program recorded thereon, and electronic comic display method | |
US20210150214A1 (en) | Method for Displaying Service Information on Preview Interface and Electronic Device | |
US8952989B2 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium | |
JP2014197341A (en) | Electronic book production device, electronic book system, electronic book production method and program | |
WO2020042468A1 (en) | Data processing method and device, and device for processing data | |
CN107895006A (en) | Audio frequency playing method, device, storage medium and electronic equipment | |
CN111859856A (en) | Information display method and device, electronic equipment and storage medium | |
CN113655999A (en) | Rendering method, device and equipment of page control and storage medium | |
US11263447B2 (en) | Information processing method, information processing device, mobile terminal, and storage medium | |
CN104850316B (en) | E-book font method of adjustment and device | |
CN110020361A (en) | A kind of web page processing method, device, storage medium and electronic equipment | |
CN105786881A (en) | Self-adaptive electronic book and magazine file structure and corresponding methods and devices | |
KR20130015795A (en) | Method and apparatus for inputting character in a touch device | |
US20210073458A1 (en) | Comic data display system, method, and program | |
JP5954936B2 (en) | Mobile terminal device | |
CN106445320A (en) | Method and device for manufacturing and displaying contents of electronic book | |
KR20210050484A (en) | Information processing method, device and storage medium | |
US9965446B1 (en) | Formatting a content item having a scalable object | |
CN102801936B (en) | Method for realizing on screen display | |
US20130104014A1 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium | |
CN105867763A (en) | Information processing method and terminal | |
US10423706B2 (en) | Method and device for selecting information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |