CN104850316A - Method and device for adjusting fonts of electronic books - Google Patents
Method and device for adjusting fonts of electronic books Download PDFInfo
- Publication number
- CN104850316A CN104850316A CN201510213882.4A CN201510213882A CN104850316A CN 104850316 A CN104850316 A CN 104850316A CN 201510213882 A CN201510213882 A CN 201510213882A CN 104850316 A CN104850316 A CN 104850316A
- Authority
- CN
- China
- Prior art keywords
- font
- body face
- sections
- chapters
- 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.)
- Granted
Links
Landscapes
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The present invention provides a method and a device for adjusting fonts of electronic books and belongs to the technical field of computers. The method comprises the following steps: determining a main font of an electronic book, wherein the main font is a font used for the main body of the electronic book; obtaining a target font specified by a user; displaying the characters using the main font in the electronic book with the target font and remaining the fonts of the characters, except the characters using the main front, in the electronic books unchanged. By virtue of the method and the device, the problem that the users of the electronic books cannot adjust the fonts of the electronic books in related technologies or the users only can adjust all the fonts in the electronic books as one font can be solved; the effects of intelligently recognizing the fonts of the main bodies of the electronic books and modifying the fonts of the main bodies can be implemented; the method and the device are used for adjusting the fonts of the electronic books.
Description
Technical field
The disclosure relates to field of computer technology, particularly a kind of e-book font method of adjustment and device.
Background technology
Along with the constantly universal of intelligent terminal and the development of mobile Internet, the use of e-book is more and more universal, and has been a demand that cannot ignore for the self-defined of e-book style.
In correlation technique, an e-book uses different fonts for different contents usually, as used regular script for inscription, annotation, quoted passage, using black matrix or small tenon Song for title, using the Song typeface etc. for normal paragraph.After an e-book is according to the form typesetting preset, due to technical limitation, does not usually allow the user of e-book to adjust the font in this e-book, or only support all fonts in e-book to be adjusted to a kind of font.
Summary of the invention
In order to solve the problem of correlation technique, present disclose provides a kind of e-book font method of adjustment and device.Described technical scheme is as follows:
According to the first aspect of disclosure embodiment, a kind of e-book font method of adjustment is provided, comprises:
Determine the body face of e-book, body face is text font used in e-book;
Obtain the target font of user's instruction;
To in e-book, use the text importing of body face for target font, and keep the font of the word in e-book except using the word of body face constant.
Optionally, determine the body face of e-book, comprising:
According to the frequency of utilization of font each in e-book, determine the body face of e-book.
Optionally, e-book comprises at least one chapters and sections, according to the frequency of utilization of font each in e-book, determines the body face of e-book, comprising:
Using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections;
Determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is at least two kinds, then determine that the body face of middle chapters and sections is the body face of e-book, middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections comprise at least one paragraph, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Using the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph;
Determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is at least two kinds, then the body face of first paragraph at arbitrary chapters and sections is defined as the body face of arbitrary chapters and sections.
Optionally, each paragraph comprises at least one fragment, and fragment is the set of the word that in any one, parameter preset is identical,
Using font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as the body face of each paragraph, comprising:
Using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment;
Determine the font that in the body face of all fragments in any one, frequency of utilization is the highest;
If the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one;
If the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
Optionally, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Obtaining the reference font scope preset, comprise multiple with reference to font with reference to font scope, is the usual font of text in e-book with reference to font;
Add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope;
To belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
Optionally, the method also comprises:
Generator data, metadata is used to indicate the font information of body face.
Optionally, determine the body face of e-book, comprising:
Obtain the metadata preset, metadata is used to indicate the font information of body face;
According to the body face of metadata determination e-book.
According to the second aspect of disclosure embodiment, a kind of e-book font adjusting gear is provided, comprises:
Determination module, is configured to the body face determining e-book, and body face is text font used in e-book;
Acquisition module, is configured to the target font obtaining user's instruction;
Display module, is configured to use the text importing of body face for target font in e-book, and keeps the font of the word in e-book except using the word of body face constant.
Optionally, determination module, comprising:
Frequency determination submodule, is configured to, according to the frequency of utilization of font each in e-book, determine the body face of e-book.
Optionally, e-book comprises at least one chapters and sections, and frequency determination submodule, comprising:
Chapters and sections body face determination submodule, is configured to the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections;
Chapters and sections overall frequency determination submodule, is configured to determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
First chapters and sections process submodule, is configured to frequency of utilization is the highest in the body face of all chapters and sections font for time a kind of, determines that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book;
Second chapter process submodule, when being configured to frequency of utilization is the highest in the body face of all chapters and sections font at least two kinds, determine that the body face of middle chapters and sections is the body face of e-book, middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections comprise at least one paragraph, and chapters and sections body face determination submodule, comprising:
Paragraph body face determination submodule, is configured to the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph;
Paragraph overall frequency determination submodule, is configured to determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest;
First paragraph process submodule, is configured to frequency of utilization is the highest in the body face of all paragraphs font for time a kind of, determines that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections;
Second paragraph process submodule, when being configured to frequency of utilization is the highest in the body face of all paragraphs font at least two kinds, is defined as the body face of arbitrary chapters and sections by the body face of first paragraph at arbitrary chapters and sections.
Optionally, each paragraph comprises at least one fragment, and fragment is the set of the word that in any one, parameter preset is identical, and paragraph body face determination submodule is configured to:
Using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment;
Determine the font that in the body face of all fragments in any one, frequency of utilization is the highest;
If the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one;
If the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
Optionally, chapters and sections body face determination submodule is configured to:
Obtaining the reference font scope preset, comprise multiple with reference to font with reference to font scope, is the usual font of text in e-book with reference to font;
Add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope;
To belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
Optionally, this device also comprises:
Generation module, is configured to generator data, and metadata is used to indicate the font information of body face.
Optionally, determination module is configured to:
Obtain the metadata preset, metadata is used to indicate the font information of body face;
According to the body face of metadata determination e-book.
According to the third aspect of disclosure embodiment, a kind of e-book font adjusting gear is provided, comprises:
Processor;
For the storer of the executable instruction of storage of processor;
Wherein, processor is configured to:
Determine the body face of e-book, body face is text font used in e-book;
Obtain the target font of user's instruction;
To in e-book, use the text importing of body face for target font, and keep the font of the word in e-book except using the word of body face constant.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect:
Present disclose provides a kind of e-book font method of adjustment and device, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in disclosure embodiment, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only embodiments more of the present disclosure, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of a kind of e-book font method of adjustment according to an exemplary embodiment;
Fig. 2 is the process flow diagram of the another kind of e-book font method of adjustment according to an exemplary embodiment;
Fig. 3 is the schematic diagram of a kind of e-book display format that disclosure embodiment provides;
Fig. 4 is the schematic diagram of the logical model of a kind of e-book that disclosure embodiment provides;
Fig. 5 is a kind of process flow diagram determining the body face method of e-book that disclosure embodiment provides;
Fig. 6 be disclosure embodiment provide a kind of using the process flow diagram of font the highest for frequency of utilization in each chapters and sections as the body face method of each chapters and sections;
Fig. 7 be disclosure embodiment provide a kind of using the process flow diagram of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as the body face method of each paragraph;
Fig. 8 is that the another kind that provides of disclosure embodiment is using the process flow diagram of font the highest for frequency of utilization in each chapters and sections as the body face method of each chapters and sections;
Fig. 9 is the process flow diagram that another kind that disclosure embodiment provides determines the body face method of e-book;
Figure 10 is the schematic diagram before a kind of ePub e-book that disclosure embodiment provides carries out font adjustment;
Figure 11 is the process flow diagram of another the e-book font method of adjustment according to an exemplary embodiment;
Figure 12 is a kind of process flow diagram determining the body face method of each chapters and sections of ePub e-book that disclosure embodiment provides;
Figure 13 is all paragraphs of the current chapters and sections of one circulation ePub e-book that disclosure embodiment provides, and determines the process flow diagram of the body face method of each paragraph;
Figure 14 is the schematic diagram after the ePub e-book shown in Figure 10 carries out font adjustment;
Figure 15 is the structural representation of a kind of e-book font adjusting gear according to an exemplary embodiment;
Figure 16 is the structural representation of the another kind of e-book font adjusting gear according to an exemplary embodiment;
Figure 17 is the structural representation of a kind of determination module that disclosure embodiment provides;
Figure 18 is the structural representation of a kind of frequency determination submodule that disclosure embodiment provides;
Figure 19 is the structural representation of a kind of chapters and sections body face determination submodule that disclosure embodiment provides;
Figure 20 is the block diagram of a kind of device for the adjustment of e-book font according to an exemplary embodiment.
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows and meets embodiment of the present disclosure, and is used from instructions one and explains principle of the present disclosure.
Embodiment
For making object of the present disclosure, technical scheme and advantage clearly, below in conjunction with accompanying drawing, disclosure embodiment is described in further detail.
Fig. 1 is the process flow diagram of a kind of e-book font method of adjustment according to an exemplary embodiment, and this e-book font method of adjustment can comprise following several step:
In a step 11, determine the body face of e-book, this body face is text font used in e-book.
In step 12, the target font of user's instruction is obtained.
In step 13, will in e-book, use the text importing of body face for target font, and keep the font of the word in e-book except using the word of body face constant.
In sum, the e-book font method of adjustment that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Further, step 11 can comprise: according to the frequency of utilization of font each in e-book, determine the body face of e-book.
Optionally, e-book comprises at least one chapters and sections, according to the frequency of utilization of font each in e-book, determines the body face of e-book, comprising:
Using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections;
Determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is at least two kinds, then determine that the body face of middle chapters and sections is the body face of e-book, these middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections comprise at least one paragraph, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Using the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph;
Determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is at least two kinds, then the body face of first paragraph at arbitrary chapters and sections is defined as the body face of arbitrary chapters and sections.
Optionally, each paragraph comprises at least one fragment, and this fragment is the set of the word that in any one, parameter preset is identical, using font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as the body face of each paragraph, comprising:
Using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment;
Determine the font that in the body face of all fragments in any one, frequency of utilization is the highest;
If the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one;
If the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
Optionally, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Obtain the reference font scope preset, comprise multiple with reference to font with reference to font scope, this reference font is the usual font of text in e-book;
Add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope;
To belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
Optionally, after step 11, the method comprises: generator data, and this metadata is used to indicate the font information of body face.
Optionally, step 11 comprises:
Obtain the metadata preset, this metadata is used to indicate the font information of body face;
According to the body face of this metadata determination e-book.
In sum, the e-book font method of adjustment that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Fig. 2 is the process flow diagram of the another kind of e-book font method of adjustment according to an exemplary embodiment, and this e-book font method of adjustment can comprise following several step:
In step 21, determine the body face of e-book, this body face is text font used in e-book.
The word of an e-book has following a few class usually: text, quoted passage, explanatory notes, title, inscription etc.Fig. 3 shows the interface schematic diagram shown when associated electrical books enter reading model, example, and 801 in Fig. 3 is text, and 802 is title.It should be noted that, usually the catalogue of e-book is not analyzed in disclosure embodiment.
Under general situation, except text, other ratios shared by a few class word are less, except text, other a few class words occur that the probability that multi-font is arranged in pairs or groups is larger simultaneously, also namely the text of an e-book uses a kind of font usually, and user's most of time is all reading the larger body part of word amount.Font, also known as the style of calligraphy, refers to the style style of word, as the regular script of Chinese character hand-written, running hand, rapid style of writing.
The font that body part in e-book uses is called the body face of e-book by disclosure embodiment, and therefore, how the body face of self-defined e-book is key problem.First the body face of self-defined e-book needs the body face determining e-book, determines that the body face of e-book can comprise following two aspects:
On the one hand, the body face of e-book can be determined by a kind of algorithm, as according to the frequency of utilization of font each in e-book, the body face of this e-book can be determined.
It should be noted that, the chapter construction of an e-book can carry out according to the catalogue of e-book, ignore the level of e-book by e-book leveling, content between every two catalogues is the content of chapters and sections, associated electrical books are as ePub e-book, the separation of chapters and sections is would have been completed when making, and (English: The Extensible Hyper Text MarkupLanguage by extensible HyperText Markup Language; Be called for short: mode XHTML) defines each chapters and sections.XHTML is a kind of markup language, manifestation mode and HyperText Markup Language (English: Hyper Text Mark-up Language; Be called for short: HTML) similar, but grammatically stricter.From inheritance, HTML is a kind of application based on standard general markup language, is one markup language very flexibly, and XHTML is then based on extend markup language, and extend markup language is a subset of standard general markup language." hypertext " just refers in the page can comprise picture, link, even the non-legible element such as music, program.The structure of XHTML document comprise " head " partly (English: Head) and " main body " partly (English: Body), wherein " head " portion provides the information about webpage, " main body " part provides the particular content of webpage.Known see correlation technique, these two marker characters of <head> and </head> represent beginning and the ending of header information respectively.The mark comprised in head is title, the content such as preamble and explanation of the page, and itself does not show as content.These two marker characters of <body> and </body> represent beginning and the ending of actual content respectively, namely for defining the main body of document.In addition, actual content in XHTML document can be divided into several paragraphs by <p> and </p> marker character, and each paragraph can be divided into several fragments by <span> and </span> marker character.Example, an XHTML document format is as follows:
It should be noted that, no matter be with the e-book of XHTML document compiling, or with other documents as JSON (JavaScript Object Notation, javaScript object representation, a kind of lightweight data store and Interchange Format) e-book that makes, disclosure embodiment all can set up the logical model of this e-book, example, the logical model of an e-book can comprise at least one chapters and sections, each chapters and sections can comprise at least one paragraph again, and each paragraph can comprise at least one fragment according to the difference of parameter preset.Example, parameter preset can be font, the parameter such as color and font size of word, then can be divided into several fragments according to the font of the word of this paragraph content, or can be divided into several fragments according to the color of the word of this paragraph content.Disclosure embodiment, according to above-mentioned division, provides a kind of logical model of e-book, and this logical model as shown in Figure 4,1 e-book can comprise n chapters and sections, and 1 chapters and sections can comprise n paragraph, and 1 paragraph can comprise n fragment, wherein, n is more than or equal to 1.Above-mentioned parameter preset can be font, color and font size.For the e-book of XHTML document compiling, the logical model of an e-book comprises multiple XHTML document, the corresponding chapters and sections of each XHTML document, each chapters and sections are divided into multiple paragraph according to the block level label (i.e. <p> and </p> marker character) in XHTML document, each paragraph is divided into multiple fragment according to the row interior label (i.e. <span> and </span> marker character) in XHTML document, logical model shown in design of graphics 4.If not row interior label in block level label, then content wherein forms a fragment.
Accordingly, in the process of body face determining e-book, the logical model of the e-book that can provide according to disclosure embodiment is searched, determine that first the body face of e-book can determine the font that in the body face of all fragments in any one, frequency of utilization is the highest, then determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest, then the font the highest according to frequency of utilization in the body face of all chapters and sections determines the body face of this e-book.
Optionally, according to the frequency of utilization of font each in e-book, determine the body face of e-book, as shown in Figure 5, can comprise:
In step 211, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections.
Example, font as the highest in frequency of utilization in a certain chapters and sections is regular script, then using the body face of regular script as these chapters and sections.
The e-book font method of adjustment that disclosure embodiment provides can be determined paragraph, determine fragment according to row interior label (<span> and the </span> marker character as in XHTML) according to the block level label (<p> and the </p> marker character as in XHTML) in the expression document of e-book.
Optionally, each chapters and sections can comprise at least one paragraph, then step 211 is as shown in Figure 6, comprising:
In step 2111, using the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph.
Example, have five paragraphs in a certain chapters and sections, the font that five paragraph frequencies of utilization are the highest is respectively regular script, the Song typeface, black matrix, regular script and Microsoft refined black, then the body face of five paragraphs in these chapters and sections is respectively regular script, the Song typeface, black matrix, regular script and Microsoft refined black.
Further again, if each paragraph needs to add unique pattern to some content, also need the mark adding display, as XHTML can mark a fragment with row interior label.Because each paragraph can comprise at least one fragment, then step 2111 is as shown in Figure 7, comprising:
In step 2111a, using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment.
As mentioned above, each paragraph includes at least one fragment according to the difference of parameter preset, when supposing that parameter preset is the color of word, then current paragraph is divided into three fragments according to text color, the text color of the first fragment is red, the text color of the second fragment is blue, the text color of the 3rd fragment is black, and the font that in the first fragment, frequency of utilization is the highest is black matrix, the font that in second fragment, frequency of utilization is the highest is regular script, the font that in 3rd fragment, frequency of utilization is the highest is the Song typeface, then the body face of the first fragment is black matrix, the body face of the second fragment is regular script, the body face of the 3rd fragment is the Song typeface.
In step 2111b, determine the font that in the body face of all fragments in any one, frequency of utilization is the highest.
In step 2111c, if the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one.
In step 2111d, if the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
In step 2112, determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest.
In step 2113, if the font that in the body face of all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections.
In step 2114, if the font that in the body face of all paragraphs, frequency of utilization is the highest is at least two kinds, then the body face of first paragraph at arbitrary chapters and sections is defined as the body face of arbitrary chapters and sections.
In the mobile Internet epoch, e-book needs to present on the display screen of intelligent terminal, and whether the font word outward appearance presented on a display screen can be accepted to be determine that can it be used as the key factor of body face by user for a long time.Handwritten form as more inclined in regular script, is all seldom used as body face in paper book is published; Small tenon Song stroke is excessively thick, is generally used as title, is seldom used as body face; Imitation Song-Dynasty-style typeface stroke is meticulous, and on the display screen that sharpness is not high, pixel sense is comparatively obvious.Therefore, in order to improve the accuracy that body face is determined, the body face that can be e-book arranges one and comprises multiple reference font scope with reference to font, and the multiple reference fonts comprised are the usual font of text in e-book, as the Song typeface often used in paper publication, computer or can the black matrix that often uses of the operating system of terminal, on high cls, effect waits line body etc. preferably.Like this, step 211 as shown in Figure 8, comprising:
In step 21101, obtain the reference font scope preset, comprise multiple with reference to font with reference to font scope, this reference font is the usual font of text in e-book.
Example, with reference to font scope can comprise the Song typeface, black matrix and etc. line body.
In step 21102, add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope.
In step 21103, will belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
In the step 212, the font that in the body face of all chapters and sections, frequency of utilization is the highest is determined.
In step 213, if the font that in the body face of all chapters and sections, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book.
In step 214, if the font that in the body face of all chapters and sections, frequency of utilization is the highest is at least two kinds, then determine that the body face of middle chapters and sections is the body face of e-book, these middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
On the other hand, the producer of e-book can when making in e-book, arrange the metadata of body face to this e-book, this metadata is used to indicate the font information of this body face, and subscriber equipment obtains the information of body face by the metadata set.Metadata, also known as broker data, relay data, the data about data, the mainly information of data of description attribute, be used for supporting that correlation technique cannot determine the body part in e-book as function such as instruction memory location, historical data, resource lookup, file record etc., thus also cannot the font that uses of body part, there is not the concept of body face, more there is not the metadata of the font information being used to indicate body face.
Optionally, as shown in Figure 9, step 21 comprises:
In step 21a, obtain the metadata preset, this metadata is used to indicate the font information of body face.
In step 21b, according to the body face of metadata determination e-book.
The font used due to e-book text is determined by the producer of e-book, therefore, arranges body face not only efficient but also accurate by producer.
In step 22, generator data, this metadata is used to indicate the font information of body face.
After determining the body face of e-book in real time according to the algorithm of step 21, the target font that can will the text importing of body face be used in e-book to indicate for user, but in order to reduce costs, make the body face in self-defined e-book next time more convenient, also the body face of the e-book after determining can be write back in this e-book in the mode of metadata and go.
In step 23, obtain the target font of user's instruction.
User can specify self-defining font according to personal like and reading environment etc., i.e. target font.Example, the target font that user specifies can be refined black etc. for the Song typeface, regular script, black matrix and Microsoft.
In step 24, will in e-book, use the text importing of body face for target font, and keep the font of the word in e-book except using the word of body face constant.
According to step 21, after determining the body face of e-book, by the target font using the text importing of body face to indicate for user in e-book, namely user can customize the body face of e-book, reach the object of font personalization, and keep the font of the word in e-book except using the word of body face constant.As employed the e-book of the Song typeface as body face (text use font) for one, when can carry out real-time typesetting to e-book, the font of the Song typeface is replaced with target font---the black matrix of user's instruction, at e-book in the current same drafting using black matrix to carry out word, meanwhile, explanatory notes, annotation and title etc. all keep raw font constant.It should be noted that, typesetting, refer to and the visual information elements such as word, picture, figure are adjusted position, size in layout, make the process of layout's methodization of e-book.
Example, e-book has three chapters and sections, and the target font of user's instruction is for waiting line body, and the situation of the fragment that the paragraph that each chapters and sections of e-book comprise, each paragraph comprise and the font that each fragment uses is as shown in table 1:
Table 1
As shown in Table 1, the font that the first paragraph frequency of utilization of the first chapters and sections of this e-book is the highest is black matrix, then the body face of the first paragraph of the first chapters and sections is black matrix; The font that second paragraph frequency of utilization of the first chapters and sections is the highest is the Song typeface, then the body face of the second paragraph of second chapter is the Song typeface.The font the highest due to frequency of utilization in the body face of two paragraphs of the first chapters and sections is two kinds, then the body face of the first chapters and sections is body face---the black matrix of the first paragraph.
The font that first paragraph frequency of utilization of the second chapter of this e-book is the highest is the Song typeface, then the body face of the first paragraph of second chapter is the Song typeface; The font the highest due to three fragment frequencies of utilization of the second paragraph of second chapter is the Song typeface, black matrix and regular script, then the Song typeface used at first is defined as the body face of the second paragraph of second chapter, then the body face of second chapter is the Song typeface.
Chapter 3, the font that the first paragraph frequency of utilization of joint is the highest is regular script, then the body face of the first paragraph of chapter 3 joint is regular script; Chapter 3, the font that the second paragraph frequency of utilization of joint is the highest is the Song typeface, then the body face of the second paragraph of chapter 3 joint is the Song typeface; Chapter 3, the font that the 3rd paragraph frequency of utilization of joint is the highest is black matrix, then the body face of the 3rd paragraph of chapter 3 joint is black matrix.The font the highest due to frequency of utilization in the body face of three paragraphs of chapter 3 joint is three kinds, then the body face of chapter 3 joint is body face---the regular script of the first paragraph.
Body face due to the first chapters and sections is black matrix, the body face of second chapter is the Song typeface, chapter 3, the body face of joint is regular script, and the font that in the body face of three chapters and sections, frequency of utilization is the highest is three kinds, then the body face of this e-book is body face---the Song typeface of middle chapters and sections and second chapter.
In order to improve the accuracy that body face is determined, the reference font scope that the body face being assumed to be this e-book is arranged is black matrix and the Song typeface, then this above-mentionedly determines that, in the process of the body face of e-book, the body face of the first chapters and sections is constant, or is black matrix; The font the highest due to the 3rd fragment frequency of utilization of the second paragraph of second chapter is regular script, regular script does not belong to reference within the scope of font, therefore, the font that the frequency of utilization of the second paragraph of second chapter is the highest is the Song typeface and black matrix, and the body face of second chapter is the Song typeface; Because the font regular script that the first paragraph frequency of utilization of chapter 3 joint is the highest does not belong to reference within the scope of font, second paragraph and the highest font of the 3rd paragraph frequency of utilization belong to reference within the scope of font, therefore, can can determine according to the body face of the second paragraph of chapter 3 and the 3rd paragraph according to the body face of chapter 3, from the above, the body face of chapter 3 is the Song typeface.Therefore, the body face of this e-book is body face---the Song typeface of middle chapters and sections and second chapter.The reference font scope proposed can reduce the number of times of font frequency of utilization in each chapters and sections of adding up each chapters and sections further.
After determining the body face (i.e. the Song typeface) of this e-book, in order to reduce costs, generate the metadata of the instruction Song typeface, so that the body face next time in self-defined e-book is more convenient.
Finally, will in e-book, use the text importing of the Song typeface for waiting line body, and keep the font of the word in e-book except using the word of the Song typeface constant.
As one of most popular e-book, ePub is a kind of e-book form based on XML, and it is (English: Cascading Style Sheet by the Cascading Style Sheet of W3C that it goes out plate structure; Be called for short: CSS) and XHTML specification describe, the bookbinding structure going out plate structure is by its open packaging form (English: OpenPackaging Format; Be called for short: OPF) specification describes, the packaging structure of physical file is (English: Open Container Format by its open container form; Be called for short: OCF) specification describes.Wherein, CSS really can accomplish that webpage shows a kind of form design language be separated with content.For the performance of conventional HTML, CSS can carry out the accurate control of Pixel-level to the position typesetting of the object in webpage, support nearly all font size pattern, have the ability to web object and model pattern editor, and can preliminary interaction design be carried out.
Disclosure embodiment, for a certain e-book of ePub form, is described in detail to this e-book font method of adjustment.Suppose that current time user reads this e-book by subscriber equipment (as mobile phone), Figure 10 show this ePub e-book carry out font adjustment before schematic diagram.With reference to font scope comprise the Song typeface, black matrix and etc. line body three kinds, Figure 11 is the process flow diagram of another the e-book font method of adjustment according to an exemplary embodiment, and this e-book font method of adjustment can comprise following several step:
In step 301, according to ePub format specification, it is carried out to the parsing of bookbinding structure, obtain the XHTML text of each chapters and sections of ePub e-book.
In step 302, obtain the reference font scope preset, all chapters and sections of chaining search ePub e-book, determine the body face of each chapters and sections.
Optionally, step 302 as shown in figure 12, comprising:
In step 3021, adopt the XML parser of standard to carry out parsing to the XHTML text of current chapters and sections and form tag tree.
In step 3022, the traversal of carrying out depth-first to the tag tree generated builds the logical model of current chapters and sections.
First the CSS pattern completing current label in ergodic process is searched, and uses information with the font obtaining current label; Secondly according to the principle construction logical model that block level label (as <p> and </p> marker character) forms paragraph, row interior label (as <span> and </span> marker character) forms fragment.If without any label in block level label, then content wherein forms a fragment.
In step 3023, circulate all paragraphs of current chapters and sections, determines the body face of each paragraph.
Optionally, step 3023 as shown in figure 13, comprising:
In step 3023a, all fragments of the current paragraph that circulates, determine the font that each fragment uses, if it is with reference within the scope of font, then retains, otherwise skip.
In step 3023b, if the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all fragments, frequency of utilization is the highest is the body face of current paragraph; Otherwise, the font that font the highest for frequency of utilization in the body face of all fragments uses at first in current paragraph is defined as the body face of current paragraph.
In step 3024, if the font that in the body face of all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of current chapters and sections; Otherwise, the body face of first paragraph at current chapters and sections is defined as the body face of current chapters and sections.
In step 303, if the font that in the body face of all chapters and sections, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of current ePub e-book; Otherwise, be the body face of current ePub e-book by the body face of middle chapters and sections.
It should be noted that, the body part of middle chapters and sections normally ePub e-book.
The body face of ePub e-book can be determined according to above-mentioned steps.
In step 304, generator data, this metadata 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, will in current ePub e-book, use the text importing of body face for target font, and keep the font of the word in current ePub e-book except using the word of body face constant.
Correlation technique cannot determine the body part in e-book, thus also cannot the font that uses of body part, there is not the concept of body face, more there are not the data of the font information being used to indicate body face, therefore, cannot realize in correlation technique adopting searching and replacement of the word of body face display, and in disclosure embodiment, can by determining body face, then adopt the original word adopting body face display of target font display, realize adopting searching and replacement of the word of body face display.Example, suppose to use body face for black matrix in current ePub e-book, the target font that user specifies is regular script, so the schematic diagram after font adjustment is carried out as shown in figure 14 to current ePub e-book, in Figure 14 and Figure 10 140 represents the word using body face in current ePub e-book, the font of 140 before adjustment is black matrix, and the font of 140 after adjustment is regular script.Can find out; this e-book font method of adjustment makes user when read electronic books; both most of text importing user read is in order to the black matrix of user habit; namely the demand of user to the self-defined font of e-book is met; do not destroy again the collocation of original font; namely save the original font collocation of e-book to greatest extent, reach the balance between user's request and the creation protecting e-book producer.
It should be noted that; the sequencing of the e-book font method of adjustment step that disclosure embodiment provides can suitably adjust; step also according to circumstances can carry out corresponding increase and decrease; anyly be familiar with those skilled in the art in the technical scope that the disclosure discloses; the method changed can be expected easily; all should be encompassed within protection domain of the present disclosure, therefore repeat no more.
In sum, the e-book font method of adjustment that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Following is disclosure device embodiment, may be used for performing disclosure embodiment of the method.For the details do not disclosed in disclosure device embodiment, please refer to disclosure embodiment of the method.
Figure 15 is the structural representation of a kind of e-book font adjusting gear according to an exemplary embodiment, and this device 50 can comprise:
Determination module 1501, is configured to the body face determining e-book, and this body face is text font used in e-book.
Acquisition module 1502, is configured to the target font obtaining user's instruction.
Display module 1503, is configured to use the text importing of body face for target font in e-book, and keeps the font of the word in e-book except using the word of body face constant.
In sum, the e-book font adjusting gear that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Figure 16 is the structural representation basis of the another kind of e-book font adjusting gear according to an exemplary embodiment, and this device 50 can comprise:
Determination module 1501, is configured to the body face determining e-book, and this body face is text font used in e-book.
Acquisition module 1502, is configured to the target font obtaining user's instruction.
Display module 1503, is configured to use the text importing of body face for target font in e-book, and keeps the font of the word in e-book except using the word of body face constant.
Generation module 1504, is configured to generator data, and this metadata is used to indicate the font information of described body face.
Wherein, determination module 1501 as shown in figure 17, comprising:
Frequency determination submodule 15011, is configured to, according to the frequency of utilization of font each in e-book, determine the body face of e-book.
Optionally, e-book comprises at least one chapters and sections, and frequency determination submodule 15011, as shown in figure 18, comprising:
Chapters and sections body face determination submodule 180, is configured to the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections.
Chapters and sections overall frequency determination submodule 181, is configured to determine the font that in the body face of all chapters and sections, frequency of utilization is the highest.
First chapters and sections process submodule 182, is configured to frequency of utilization is the highest in the body face of all chapters and sections font for time a kind of, determines that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book.
Second chapter process submodule 183, when being configured to frequency of utilization is the highest in the body face of all chapters and sections font at least two kinds, determine that the body face of middle chapters and sections is the body face of e-book, these middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections comprise at least one paragraph, and chapters and sections body face determination submodule 180, as shown in figure 19, comprising:
Paragraph body face determination submodule 1801, is configured to the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph.
Paragraph overall frequency determination submodule 1802, is configured to determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest.
First paragraph process submodule 1803, is configured to frequency of utilization is the highest in the body face of all paragraphs font for time a kind of, determines that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections.
Second paragraph process submodule 1804, when being configured to frequency of utilization is the highest in the body face of all paragraphs font at least two kinds, is defined as the body face of arbitrary chapters and sections by the body face of first paragraph at arbitrary chapters and sections.
Optionally, each paragraph comprises at least one fragment, and fragment is the set of the word that in any one, parameter preset is identical, and paragraph body face determination submodule 1801 is configured to:
Using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment;
Determine the font that in the body face of all fragments in any one, frequency of utilization is the highest;
If the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one;
If the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
Optionally, chapters and sections body face determination submodule 180 is configured to:
Obtain the reference font scope preset, comprise multiple with reference to font with reference to font scope, this reference font is the usual font of text in e-book;
Add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope.
To belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
Optionally, determination module 1501 is configured to:
Obtain the metadata preset, this metadata is used to indicate the font information of described body face;
According to the body face of metadata determination e-book.
In sum, the e-book font adjusting gear that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Figure 20 is the block diagram of a kind of device 500 for the adjustment of e-book font according to an exemplary embodiment.Such as, device 500 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Figure 20, device 500 can comprise following one or more assembly: processing components 5002, storer 5004, power supply module 5006, multimedia groupware 5008, audio-frequency assembly 5010, the interface 5012 of I/O (I/O), sensor module 5014, and communications component 5016.
The integrated operation of the usual control device 500 of processing components 5002, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 5002 can comprise one or more processor 5020 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 5002 can comprise one or more module, and what be convenient between processing components 5002 and other assemblies is mutual.Such as, processing components 5002 can comprise multi-media module, mutual with what facilitate between multimedia groupware 5008 and processing components 5002.
Storer 5004 is configured to store various types of data to be supported in the operation of device 500.The example of these data comprises the instruction of any application program for operating on device 500 or method, contact data, telephone book data, message, picture, video etc.Storer 5004 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that power supply module 5006 is device 500 provide electric power.Power supply module 5006 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 500 and be associated.
Multimedia groupware 5008 is included in the screen providing an output interface between described device 500 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 5008 comprises a front-facing camera and/or post-positioned pick-up head.When device 500 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 5010 is configured to export and/or input audio signal.Such as, audio-frequency assembly 5010 comprises a microphone (MIC), and when device 500 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 5004 further or be sent via communications component 5016.In certain embodiments, audio-frequency assembly 5010 also comprises a loudspeaker, for output audio signal.
I/O interface 5012 is for providing interface between processing components 5002 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 5014 comprises one or more sensor, for providing the state estimation of various aspects for device 500.Such as, sensor module 5014 can detect the opening/closing state of device 500, the relative positioning of assembly, such as described assembly is display and the keypad of device 500, the position of all right pick-up unit 500 of sensor module 5014 or device 500 1 assemblies changes, the presence or absence that user contacts with device 500, the temperature variation of device 500 orientation or acceleration/deceleration and device 500.Sensor module 5014 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 5014 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 5014 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 5016 is configured to the communication being convenient to wired or wireless mode between device 500 and other equipment.Device 500 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 5016 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communications component 5016 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 500 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 5004 of instruction, above-mentioned instruction can perform said method by the processor 5020 of device 500.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of device 500, make device 500 can perform a kind of e-book font method of adjustment, described method comprises:
Determine the body face of e-book, this body face is text font used in e-book;
Obtain the target font of user's instruction;
To in e-book, use the text importing of body face for target font, and keep the font of the word in e-book except using the word of body face constant.
Optionally, determine the body face of e-book, comprising:
According to the frequency of utilization of font each in e-book, determine the body face of e-book.
Optionally, e-book comprises at least one chapters and sections, according to the frequency of utilization of font each in e-book, determines the body face of e-book, comprising:
Using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections;
Determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all chapters and sections, frequency of utilization is the highest is the body face of e-book;
If the font that in the body face of all chapters and sections, frequency of utilization is the highest is at least two kinds, then determine that the body face of middle chapters and sections is the body face of e-book, middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in all chapters and sections except first chapters and sections and end chapters and sections.
Optionally, each chapters and sections comprise at least one paragraph, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Using the body face of font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as each paragraph;
Determine the font that in the body face of all paragraphs in arbitrary chapters and sections, frequency of utilization is the highest;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of all paragraphs, frequency of utilization is the highest is the body face of arbitrary chapters and sections;
If the font that in the body face of all paragraphs, frequency of utilization is the highest is at least two kinds, then the body face of first paragraph at arbitrary chapters and sections is defined as the body face of arbitrary chapters and sections.
Optionally, each paragraph comprises at least one fragment, and fragment is the set of the word that in any one, parameter preset is identical,
Using font the highest for frequency of utilization in paragraph each in arbitrary chapters and sections as the body face of each paragraph, comprising:
Using the body face of font the highest for frequency of utilization in fragment each in any one as each fragment;
Determine the font that in the body face of all fragments in any one, frequency of utilization is the highest;
If the font that in the body face of all fragments, frequency of utilization is the highest is a kind of, then determine that the font that in the body face of all fragments, frequency of utilization is the highest is the body face of any one;
If the font that in the body face of all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of all fragments uses at first in any one is defined as the body face of any one.
Optionally, using the body face of font the highest for frequency of utilization in each chapters and sections as each chapters and sections, comprising:
Obtain the reference font scope preset, comprise multiple with reference to font with reference to font scope, this reference font is the usual font of text in e-book;
Add up in each chapters and sections the frequency of utilization of font in each chapters and sections belonged to reference to font scope;
To belong in each chapters and sections with reference to font scope and the highest font of frequency of utilization as the body face of each chapters and sections.
Optionally, method also comprises:
Generator data, metadata is used to indicate the font information of body face.
Optionally, determine the body face of e-book, comprising:
Obtain the metadata preset, metadata is used to indicate the font information of body face;
According to the body face of metadata determination e-book.
In sum, the device for the adjustment of e-book font that disclosure embodiment provides, font used for text in e-book can be defined as the body face of e-book, by the target font using the text importing of this body face to specify for user in e-book, and the font of word in maintenance e-book except using the word of body face is constant, Intelligent Recognition e-book text type can be realized, and to the effect that text type is modified.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the device of foregoing description and the specific works process of module, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
The foregoing is only preferred embodiment of the present disclosure, not in order to limit the disclosure, all within spirit of the present disclosure and principle, any amendment done, equivalent replacement, improvement etc., all should be included within protection domain of the present disclosure.
Claims (17)
1. an e-book font method of adjustment, is characterized in that, comprising:
Determine the body face of e-book, described body face is text font used in described e-book;
Obtain the target font of user's instruction;
To in described e-book, use the text importing of described body face to be described target font, and keep the font of the word in described e-book except the word of the described body face of described use constant.
2. method according to claim 1, is characterized in that, the described body face determining e-book, comprising:
According to the frequency of utilization of font each in described e-book, determine the body face of described e-book.
3. method according to claim 2, is characterized in that, described e-book comprises at least one chapters and sections, the described frequency of utilization according to font each in described e-book, determines the body face of described e-book, comprising:
Using the body face of font the highest for frequency of utilization in each described chapters and sections as each described chapters and sections;
Determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
If the font that in the body face of described all chapters and sections, frequency of utilization is the highest is a kind of, then determine that font that in the body face of described all chapters and sections, frequency of utilization is the highest is the body face of described e-book;
If the font that in the body face of described all chapters and sections, frequency of utilization is the highest is at least two kinds, then determine that the body face of middle chapters and sections is the body face of described e-book, described middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in described all chapters and sections except first chapters and sections and end chapters and sections.
4. method according to claim 3, is characterized in that, each described chapters and sections comprise at least one paragraph, described using font the highest for frequency of utilization in each described chapters and sections as the body face of each described chapters and sections, comprising:
Using the body face of font the highest for frequency of utilization in described paragraph each in arbitrary chapters and sections as each described paragraph;
Determine the font that in the body face of all paragraphs in described arbitrary chapters and sections, frequency of utilization is the highest;
If the font that in the body face of described all paragraphs, frequency of utilization is the highest is a kind of, then determine that font that in the body face of described all paragraphs, frequency of utilization is the highest is the body face of described arbitrary chapters and sections;
If the font that in the body face of described all paragraphs, frequency of utilization is the highest is at least two kinds, then the body face of first paragraph at described arbitrary chapters and sections is defined as the body face of described arbitrary chapters and sections.
5. method according to claim 4, is characterized in that, each described paragraph comprises at least one fragment, and described fragment is the set of the word that in described any one, parameter preset is identical,
Described using font the highest for frequency of utilization in described paragraph each in arbitrary chapters and sections as the body face of each described paragraph, comprising:
Using the body face of font the highest for frequency of utilization in described fragment each in any one as each described fragment;
Determine the font that in the body face of all fragments in described any one, frequency of utilization is the highest;
If the font that in the body face of described all fragments, frequency of utilization is the highest is a kind of, then determine that font that in the body face of described all fragments, frequency of utilization is the highest is the body face of described any one;
If the font that in the body face of described all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of described all fragments uses at first in described any one is defined as the body face of described any one.
6. method according to claim 3, is characterized in that, described using font the highest for frequency of utilization in each described chapters and sections as the body face of each described chapters and sections, comprising:
Obtain the reference font scope preset, described reference font scope comprises multiple with reference to font, and described reference font is the usual font of text in e-book;
Add up in each described chapters and sections and belong to the described frequency of utilization of font in each described chapters and sections with reference to font scope;
To belong in each described chapters and sections described with reference to font scope and the highest font of frequency of utilization as the body face of each described chapters and sections.
7. method according to claim 6, is characterized in that, described method also comprises:
Generator data, described metadata is used to indicate the font information of described body face.
8. method according to claim 1, is characterized in that, the described body face determining e-book, comprising:
Obtain the metadata preset, described metadata is used to indicate the font information of described body face;
The body face of described e-book is determined according to described metadata.
9. an e-book font adjusting gear, is characterized in that, comprising:
Determination module, is configured to the body face determining e-book, and described body face is text font used in described e-book;
Acquisition module, is configured to the target font obtaining user's instruction;
Display module, is configured to use the text importing of described body face to be described target font in described e-book, and keeps the font of the word in described e-book except the word of the described body face of described use constant.
10. device according to claim 9, is characterized in that, described determination module, comprising:
Frequency determination submodule, is configured to, according to the frequency of utilization of font each in described e-book, determine the body face of described e-book.
11. devices according to claim 10, is characterized in that, described e-book comprises at least one chapters and sections, and described frequency determination submodule, comprising:
Chapters and sections body face determination submodule, is configured to the body face of font the highest for frequency of utilization in each described chapters and sections as each described chapters and sections;
Chapters and sections overall frequency determination submodule, is configured to determine the font that in the body face of all chapters and sections, frequency of utilization is the highest;
First chapters and sections process submodule, is configured to frequency of utilization is the highest in the body face of described all chapters and sections font for time a kind of, determines that font that in the body face of described all chapters and sections, frequency of utilization is the highest is the body face of described e-book;
Second chapter process submodule, when being configured to frequency of utilization is the highest in the body face of described all chapters and sections font at least two kinds, determine that the body face of middle chapters and sections is the body face of described e-book, described middle chapters and sections are the chapters and sections of predeterminated position in the chapters and sections in described all chapters and sections except first chapters and sections and end chapters and sections.
12. devices according to claim 11, is characterized in that, each described chapters and sections comprise at least one paragraph, and described chapters and sections body face determination submodule, comprising:
Paragraph body face determination submodule, is configured to the body face of font the highest for frequency of utilization in described paragraph each in arbitrary chapters and sections as each described paragraph;
Paragraph overall frequency determination submodule, is configured to determine the font that in the body face of all paragraphs in described arbitrary chapters and sections, frequency of utilization is the highest;
First paragraph process submodule, is configured to frequency of utilization is the highest in the body face of described all paragraphs font for time a kind of, determines that font that in the body face of described all paragraphs, frequency of utilization is the highest is the body face of described arbitrary chapters and sections;
Second paragraph process submodule, when being configured to frequency of utilization is the highest in the body face of described all paragraphs font at least two kinds, is defined as the body face of described arbitrary chapters and sections by the body face of first paragraph at described arbitrary chapters and sections.
13. devices according to claim 12, is characterized in that, each described paragraph comprises at least one fragment, and described fragment is the set of the word that in described any one, parameter preset is identical, and described paragraph body face determination submodule is configured to:
Using the body face of font the highest for frequency of utilization in described fragment each in any one as each described fragment;
Determine the font that in the body face of all fragments in described any one, frequency of utilization is the highest;
If the font that in the body face of described all fragments, frequency of utilization is the highest is a kind of, then determine that font that in the body face of described all fragments, frequency of utilization is the highest is the body face of described any one;
If the font that in the body face of described all fragments, frequency of utilization is the highest is at least two kinds, then the font that font the highest for frequency of utilization in the body face of described all fragments uses at first in described any one is defined as the body face of described any one.
14. devices according to claim 11, is characterized in that, described chapters and sections body face determination submodule is configured to:
Obtain the reference font scope preset, described reference font scope comprises multiple with reference to font, and described reference font is the usual font of text in e-book;
Add up in each described chapters and sections and belong to the described frequency of utilization of font in each described chapters and sections with reference to font scope;
To belong in each described chapters and sections described with reference to font scope and the highest font of frequency of utilization as the body face of each described chapters and sections.
15. devices according to claim 14, is characterized in that, described device also comprises:
Generation module, is configured to generator data, and described metadata is used to indicate the font information of described body face.
16. devices according to claim 9, is characterized in that, described determination module is configured to:
Obtain the metadata preset, described metadata is used to indicate the font information of described body face;
The body face of described e-book is determined according to described metadata.
17. 1 kinds of e-book font adjusting gears, is characterized in that, comprising:
Processor;
For storing the storer of the executable instruction of described processor;
Wherein, described processor is configured to:
Determine the body face of e-book, described body face is text font used in described e-book;
Obtain the target font of user's instruction;
To in described e-book, use the text importing of described body face to be described target font, and keep the font of the word in described e-book except the word of the described body face of described use constant.
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 true CN104850316A (en) | 2015-08-19 |
CN104850316B 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) |
Cited By (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 (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6954898B1 (en) * | 1999-07-23 | 2005-10-11 | International Business Machines Corporation | Method of standardizing character information in electronic documents |
CN101876967A (en) * | 2010-03-25 | 2010-11-03 | 深圳市万兴软件有限公司 | Method for generating PDF text paragraphs |
CN101923535A (en) * | 2009-06-11 | 2010-12-22 | 盛大计算机(上海)有限公司 | Method for processing word size of rich text formatted file |
CN102103574A (en) * | 2009-12-17 | 2011-06-22 | 北大方正集团有限公司 | Book sample file content formatting output method and system |
CN104239282A (en) * | 2014-09-09 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Processing method and device for electronic book |
-
2015
- 2015-04-29 CN CN201510213882.4A patent/CN104850316B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6954898B1 (en) * | 1999-07-23 | 2005-10-11 | International Business Machines Corporation | Method of standardizing character information in electronic documents |
CN101923535A (en) * | 2009-06-11 | 2010-12-22 | 盛大计算机(上海)有限公司 | Method for processing word size of rich text formatted file |
CN102103574A (en) * | 2009-12-17 | 2011-06-22 | 北大方正集团有限公司 | Book sample file content formatting output method and system |
CN101876967A (en) * | 2010-03-25 | 2010-11-03 | 深圳市万兴软件有限公司 | Method for generating PDF text paragraphs |
CN104239282A (en) * | 2014-09-09 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Processing method and device for electronic book |
Non-Patent Citations (1)
Title |
---|
王鹏: "《玩转iPhone5》", 31 January 2013, 北京:中国电力出版社 * |
Cited By (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 |
Also Published As
Publication number | Publication date |
---|---|
CN104850316B (en) | 2019-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020187118A1 (en) | Page presentation method and apparatus | |
RU2683174C2 (en) | Ink to text representation conversion | |
US20110252302A1 (en) | Fitting network content onto a reduced-size screen | |
US20130283195A1 (en) | Methods and apparatus for dynamically adapting a virtual keyboard | |
WO2020187117A1 (en) | Figure page display method and apparatus, and text page display method and apparatus | |
US20170220858A1 (en) | Optical recognition of tables | |
US20140298164A1 (en) | Electronic book production apparatus, electronic book system, electronic book production method, and non-transitory computer-readable medium | |
US10402474B2 (en) | Keyboard input corresponding to multiple languages | |
CN105302445A (en) | Graphical user interface drawing method and device | |
US10452747B2 (en) | Dynamically formatting scalable vector graphics | |
US9460089B1 (en) | Flow rendering of annotation characters | |
US20150058711A1 (en) | Presenting fixed format documents in reflowed format | |
CN109408506B (en) | Table data processing method and device | |
CN113515928B (en) | Electronic text generation method, device, equipment and medium | |
CN111859856A (en) | Information display method and device, electronic equipment and storage medium | |
US9141867B1 (en) | Determining word segment boundaries | |
CN105094357A (en) | Input method and device as well as electronic equipment | |
CN104850316A (en) | Method and device for adjusting fonts of electronic books | |
CN114745585B (en) | Subtitle display method, device, terminal and storage medium | |
US20210073458A1 (en) | Comic data display system, method, and program | |
CN115640783A (en) | Method, device, equipment and storage medium for document content display | |
JP2017199408A (en) | Document display device, document display method, document display system, and program | |
KR101368610B1 (en) | Method and system for selecting paragraph on electronic book environments | |
KR101978297B1 (en) | System for data common service, apparatus and method for data common service | |
US20130104014A1 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium |
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 |