CN107402911A - Method for editing text and device for terminal - Google Patents
Method for editing text and device for terminal Download PDFInfo
- Publication number
- CN107402911A CN107402911A CN201710590253.2A CN201710590253A CN107402911A CN 107402911 A CN107402911 A CN 107402911A CN 201710590253 A CN201710590253 A CN 201710590253A CN 107402911 A CN107402911 A CN 107402911A
- Authority
- CN
- China
- Prior art keywords
- touch
- font size
- text
- screen
- alternative text
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0483—Interaction with page-structured environments, e.g. book metaphor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
This application discloses the method for editing text and device for terminal.One embodiment of this method includes:In response to detecting the touch operation for generating text selecting instruction, the contact area between touch objects and touch-screen is obtained;According to the contact area and the corresponding relation of font size pre-set, it is determined that font size corresponding with acquired contact area;The font size of alternative text in touch-screen is adjusted according to identified font size.This embodiment improves the efficiency of text editing.
Description
Technical field
The application is related to field of computer technology, and in particular to a kind of method for editing text and device for terminal.
Background technology
User is when using the reading content of text for the terminal for including touch-screen, such as reads short message, mail, webpage word
Etc. content when, it is often necessary to enter edlin to text, when carrying out selection operation to the text of display, because user's finger is thicker
Or the reasons such as text is smaller are replicated, maloperation easily occurs.
In the prior art, user only by gesture or clicks on screen magnifying text font, then carries out selection operation again,
However, it can so cause the reduction of text editing efficiency.
The content of the invention
The purpose of the application is to propose a kind of improved method for editing text and device for terminal, more than solving
The technical problem that background section is mentioned.
In a first aspect, the embodiment of the present application provides a kind of method for editing text for terminal, terminal includes touch-screen,
This method includes:In response to detecting the touch operation for generating text selecting instruction, obtain between touch objects and touch-screen
Contact area;According to the contact area and the corresponding relation of font size pre-set, it is determined that corresponding with acquired contact area
Font size;The font size of alternative text in touch-screen is adjusted according to identified font size.
In the present embodiment, the font size of alternative text in touch-screen is adjusted according to identified font size, including:Obtain alternative
The current font size of text;It is less than identified font size in response to current font size, the font size of alternative text is adjusted to be determined
Font size.
In the present embodiment, adjusted according to identified font size in touch-screen after the font size of alternative text, method is also wrapped
Include:In response to receiving preset instructions, operation corresponding to preset instructions is performed to the text being selected in alternative text, wherein,
Preset instructions include at least one of following:Duplicate instructions, shearing instruction, delete instruction, highlight instruction, interpretive order.
In the present embodiment, after performing corresponding operation to the text being selected in alternative text, method also includes:Will
The font size of alternative text recovers the font size to adjustment.
In the present embodiment, corresponding relation is determined via following steps:Obtain the history note associated with target terminal
Record, historical record include the touch area of historical touch operation and font size corresponding with the touch area of historical touch operation, its
In, historical touch operation is included after collecting the operation for changing alternative text font size, receives the alternative text for being changed
Before the preset instructions for the text being selected in this, what is detected touches for the touch operation for the alternative text changed, history
Touching font size corresponding to the touch area of operation includes amended alternative text font size;Corresponding relation is determined according to historical record.
In the present embodiment, the touch operation for generating text selecting instruction includes touch objects in touch objects and touch-screen
The residence time of the original position of contact exceedes the touch operation of preset time threshold;And obtain touch objects and touch-screen it
Between contact area, including:Obtain the mean exposure area between touch objects and touch-screen in the residence time.
In the present embodiment, pressure sensor is provided with touch-screen, for generating the touch operation of text selecting instruction
Exceed the touch operation of default first pressure threshold value including the pressure between touch objects and touch-screen;And obtain touch objects with
Contact area between touch-screen, including:It is flat in default range of pressure values to obtain pressure between touch objects and touch-screen
Equal contact area, wherein, the pressure upper limit value of range of pressure values is less than first pressure threshold value.
Second aspect, the embodiment of the present application provide a kind of text editing apparatus for terminal, and terminal includes touch-screen,
The device includes:Acquiring unit, in response to detecting the touch operation for generating text selecting instruction, obtaining touch objects
Contact area between touch-screen;Determining unit, the contact area and the corresponding relation of font size pre-set for basis, really
Fixed font size corresponding with acquired contact area;Adjustment unit, for alternative in the font size adjustment touch-screen determined by
The font size of text.
In the present embodiment, adjustment unit, including:Obtain subelement, the font size current for obtaining alternative text;Adjustment
Subelement, for being less than identified font size in response to current font size, the font size of alternative text is adjusted to identified word
Number.
In the present embodiment, device also includes execution unit, and execution unit is used for:It is right in response to receiving preset instructions
The text being selected in alternative text is performed and operated corresponding to preset instructions, wherein, preset instructions include at least one of following:It is multiple
System instruction, shearing instruction, delete instruction, highlight instruction, interpretive order.
In the present embodiment, device also includes recovery unit, and recovery unit is used for:The font size of alternative text is recovered to adjusting
Font size before whole.
In the present embodiment, device also includes corresponding relation determining unit, and corresponding relation determines to be used for:Obtain whole with target
The historical record of association is held, historical record includes the touch area of historical touch operation and the touch area with historical touch operation
Corresponding font size, wherein, historical touch operation is included after collecting the operation for changing alternative text font size, receives for institute
Modification alternative text in be selected text preset instructions before, detect for the touch for the alternative text changed
Operation, font size corresponding to the touch area of historical touch operation include amended alternative text font size;It is true according to historical record
Determine corresponding relation.
In the present embodiment, the touch operation for generating text selecting instruction includes touch objects in touch objects and touch-screen
The residence time of the original position of contact exceedes the touch operation of preset time threshold;And acquiring unit further configures use
In:Obtain the mean exposure area between touch objects and touch-screen in the residence time.
In the present embodiment, pressure sensor is provided with touch-screen, for generating the touch operation of text selecting instruction
Exceed the touch operation of default first pressure threshold value including the pressure between touch objects and touch-screen;And acquiring unit enters one
Step is configured to:Mean exposure area of the pressure in default range of pressure values between touch objects and touch-screen is obtained, wherein,
The pressure upper limit value of range of pressure values is less than first pressure threshold value.
The third aspect, the embodiment of the present application provide a kind of equipment, including:One or more processors;Storage device, use
In storing one or more programs, when said one or multiple programs are by said one or multiple computing devices so that above-mentioned
One or more processors realize such as the above-mentioned method of first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable recording medium, are stored thereon with computer journey
Sequence, it is characterised in that such as first aspect above-mentioned method is realized when the program is executed by processor.
The method for editing text and device for terminal that the embodiment of the present application provides, by being used to give birth in response to detecting
Into the touch operation of text selection instruction, the contact area between touch objects and touch-screen is obtained, then basis is pre-set
The corresponding relation of contact area and font size, it is determined that font size corresponding with acquired contact area, the last word determined by
The font size of alternative text in number adjustment touch-screen so that the size of alternative text matches with contact area, is easy to for alternatively
The progress of the selection operation of text, the efficiency of text editing can be improved.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the indicative flowchart according to one embodiment of the method for editing text for terminal of the application;
Fig. 3 A are detected in the application scenarios for the method for editing text for being used for terminal according to the application for generating text
The schematic diagram of the touch operation of selection instruction;
Fig. 3 B are for alternative text in touch-screen in the application scenarios of the method for editing text of terminal according to the application
Schematic diagram after font size adjustment;
Fig. 4 is the indicative flowchart according to the further embodiment of the method for editing text for terminal of the application;
Fig. 5 is the exemplary block diagram according to one embodiment of the text editing apparatus for terminal of the application;
Fig. 6 is adapted for the structural representation of the computer system of the equipment for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the method for editing text for terminal that can apply the application or the text editing dress for terminal
The exemplary system architecture 100 for the embodiment put.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105.
Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with server 105, to receive or send out
Send message etc..Various applications can be installed, such as the application of reading class, web browser should on terminal device 101,102,103
With, shopping class application, searching class application, JICQ, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments for having touch-screen and supporting text editing, bag
Include but be not limited to smart mobile phone, tablet personal computer, E-book reader etc..Terminal device 101,102,103 can be in response to detection
To the touch operation for generating text selecting instruction, the contact area between touch objects and touch-screen is obtained, then according to pre-
The contact area and the corresponding relation of font size first set, it is determined that font size corresponding with acquired contact area, finally according to institute
The font size of alternative text in the font size adjustment touch-screen of determination.
Server 105 can be to provide the server of various services, such as to being installed on terminal device 101,102,103
System or application provide support background server.Server 105 can be issued to terminal for generating text selecting instruction
Touch operation associated parameter so that terminal may determine that whether an operation is to be instructed for generating text selecting
Touch operation, server 105 can also issue the corresponding relation of the contact area pre-set and font size to terminal.
It should be noted that the method for editing text that is provided of the embodiment of the present application typically by terminal device 101,102,
103 are performed, and correspondingly, text editing apparatus is generally positioned in terminal device 101,102,103.It is pointed out that this Shen
Please the method for editing text that is provided of embodiment independent of network 104 and server 105, thus, net can be not present in Fig. 1
Network 104 and server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realizing need
Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the stream of one embodiment of the method for editing text for terminal according to the application is shown
Journey 200.This is used for the method for editing text of terminal, comprises the following steps:
Step 201, in response to detecting the touch operation for generating text selecting instruction, touch objects and touch-screen are obtained
Between contact area.
In the present embodiment, the electronic equipment (terminal device 101,102,103) of method for editing text operation thereon can
In response to detecting the touch operation for generating text selecting instruction, to obtain the contact surface between touch objects and touch-screen
Product.Touch operation i.e. terminal for generating text selecting instruction can generate text selecting and refer to after the touch operation is detected
Order, in touch-screen can display highlighting etc. be used for the mark that determines selected text, touch operation can be long-press, again by, point
The specific region of screen is hit, or repeatedly touches screen etc. within a predetermined period of time.Touch objects can be the finger of user, or other
The object that the touch-screen of above-mentioned electronic equipment can sense.Contact area between touch objects and touch-screen, can be a certain
Contact area between moment touch objects and touch-screen or by statistical method, according to multiple in certain a period of time
The contact area that contact area between the touch objects and touch-screen at moment is determined, such as mean exposure area.
Step 202, according to the contact area and the corresponding relation of font size pre-set, it is determined that with acquired contact area
Corresponding font size.
In the present embodiment, above-mentioned electronic equipment can according to the contact area and the corresponding relation of font size pre-set,
It is determined that font size corresponding with contact area acquired in step 201.Above-mentioned corresponding relation can be single word in alternative word
Area need to be more than contact area or touch the proportionate relationship of area and font size, or mark off multiple contacts
The scope of area, the scope of each contact area are corresponding with font size.Specific numerical value can be according to reality in above-mentioned corresponding relation
Border needs to set, for example, can be determined based on the text editing operations in user's the past period, can also be directly by user
It is configured.If acquired contact area is excessive, i.e., more than preset value, false touch can also be judged as, without determining font size
Flow.
Exemplified by the ratio that area and font size are touched to be previously provided with, above-mentioned electronic equipment can calculate acquired
The ratio of the current font size of area and alternative word is touched, if the ratio calculated is more than the ratio pre-set, root
According to acquired touch area and the ratio-dependent pre-set font size corresponding with acquired contact area;If calculate
Ratio is less than the ratio pre-set, then can be by the word according to determined by acquired touch area and the ratio pre-set
Number, or alternatively the current font size of word is defined as font size corresponding with acquired contact area.
Step 203, the font size of alternative text in touch-screen is adjusted according to identified font size.
In the present embodiment, above-mentioned electronic equipment can be according to standby in identified font size adjustment touch-screen in step 202
The font size of selection sheet.Alternative text can be that the text that is being shown in touch-screen or user's touch operation are targeted
Text box in text.The font size of alternative text directly can be adjusted to identified font size by above-mentioned electronic equipment, also may be used
To obtain the current font size of alternative text first, it is less than identified font size in response to current font size, by the word of alternative text
Number it is adjusted to identified font size.When current font size is more than identified font size, the font size of alternative text can also be adjusted
The whole font size for determined by, in this case, if the text that user's needs replicate is more, it is favorably improved it and selects text
Speed.Above-mentioned electronic equipment can detect choosing of the user for alternative text after the font size of alternative text in adjusting touch-screen
Operation is selected, and obtains user for choosing the process instruction of text, and carries out corresponding processing operation.
The method that above-described embodiment of the application provides passes through in response to detecting for generating touching for text selecting instruction
Operation is touched, obtains the contact area between touch objects and touch-screen, then according to the contact area and pair of font size pre-set
It should be related to, it is determined that font size corresponding with acquired contact area, the last font size determined by adjusts alternative in touch-screen
The font size of text, improve the efficiency of text editing.
In some optional implementations of the present embodiment, corresponding relation can be determined via following steps:Obtain
The historical record associated with target terminal, historical record include historical touch operation touch area and with historical touch operation
Font size corresponding to area is touched, wherein, historical touch operation is included after collecting the operation for changing alternative text font size, receives
Before the preset instructions for the text being selected into the alternative text for being changed, detect for the alternative text changed
This touch operation, font size corresponding to the touch area of historical touch operation include amended alternative text font size;According to going through
Records of the Historian record determines corresponding relation.
As an example, user has been carried out after being used to generate the touch operation that text selecting instructs, mobile cursor is begun through
Select text etc. mode, its required text can not be accurately chosen yet with text font is too small, thus user stopped for
The selection operation of text, and the font of alternative text has been amplified to by modes such as scalings by satisfied degree, then enter again
The touch operation gone for generating text selecting instruction, because now font size has been subjected to modification, user is able to quick complete
The selection of paired text.Therefore, the corresponding relation accuracy determined according to historical record is higher.Further, it is also possible to history is remembered
The font size that recording includes is adjusted, for example, being adjusted it to alternative text using according to the corresponding relation that historical record determines
Afterwards, user still occurs the situation that cursor is moved repeatedly in a certain opening position when selecting text, now can also suitably increase
Font size corresponding to large touching surface product.
In some optional implementations of the present embodiment, the touch operation for generating text selecting instruction includes touching
The residence time for the original position that thing contacts in touch objects with touch-screen exceedes the touch operation of preset time threshold;And obtain
The contact area between touch objects and touch-screen is taken, including:By the mean exposure in the residence time between touch objects and touch-screen
Area, it is defined as contact area.For example, user can obtain long finger interior by period with touching by finger long-press touch-screen
The mean exposure area of screen.
In some optional implementations of the present embodiment, pressure sensor is provided with touch-screen, for generating text
The touch that the pressure that the touch operation of selection instruction is included between touch objects and touch-screen exceedes default first pressure threshold value is grasped
Make;And the contact area between acquisition touch objects and touch-screen, including:Pressure between touch objects and touch-screen is obtained to preset
Range of pressure values in mean exposure area, wherein, the pressure upper limit value of range of pressure values is less than first pressure threshold value.Example
Such as, when user presses touch-screen again, alternative text in screen can be to each word in word segmentation result with automatic word segmentation, user
Clicked.In addition, if touch objects are flexible, such as the finger of user, in weight, contact area can be more than and carry out a little on time
The contact area during operation such as selection or mobile cursor is hit, so a range of pressure values is set, according in range of pressure values
Mean exposure area determines font size, and range of pressure values can be touch objects when user carries out clicking on the operation such as selection or mobile cursor
The range of pressure values between touch-screen.
With continued reference to Fig. 3 A, Fig. 3 B, Fig. 3 A are in the application scenarios for the method for editing text for being used for terminal according to the application
The schematic diagram of the touch operation for generating text selecting instruction is detected, Fig. 3 B are that the text for being used for terminal according to the application is compiled
Schematic diagram in the application scenarios for the method for collecting in touch-screen after the font size adjustment of alternative text.In the application scenarios, Yong Huxu
The part text in alternative text is selected, therefore it has carried out being used for the touch operation for generating text selecting instruction, shadow part
Divide 301 contact areas for being user's finger and terminal touch screen.Terminal is corresponding with font size according to the contact area pre-set
Relation, it is determined that font size corresponding with the area of dash area 301 is 14 pounds, and the font size of current alternative text is 9 pounds, therefore will
The font size of alternative text is adjusted to 14 pounds as shown in Figure 3 B in touch-screen, so that user carries out text selecting.
Fig. 4 is refer to, Fig. 4 is the stream according to the further embodiment of the method for editing text for terminal of the present embodiment
Journey schematic diagram.
In Fig. 4, the flow 400 of the method for editing text for being used for terminal, comprises the following steps:
Step 401, in response to detecting the touch operation for generating text selecting instruction, touch objects and touch-screen are obtained
Between contact area.
In the present embodiment, the electronic equipment (terminal device 101,102,103) of method for editing text operation thereon can
In response to detecting the touch operation for generating text selecting instruction, to obtain the contact surface between touch objects and touch-screen
Product.
Step 402, according to the contact area and the corresponding relation of font size pre-set, it is determined that with acquired contact area
Corresponding font size.
In the present embodiment, above-mentioned electronic equipment can according to the contact area and the corresponding relation of font size pre-set,
It is determined that font size corresponding with contact area acquired in step 401.
Step 403, the current font size of alternative text is obtained.
In the present embodiment, above-mentioned electronic equipment can obtain the current font size of alternative text.Current font size can be
When detecting the touch operation for generating text selecting instruction, the font size of alternative text.
Step 404, it is less than identified font size in response to current font size, the font size of alternative text is adjusted to be determined
Font size.
In the present embodiment, above-mentioned electronic equipment can be less than identified word in step 402 in response to current font size
Number, the font size of alternative text is adjusted to identified font size.When current font size is more than identified font size in step 402,
The possibility of maloperation is smaller when user is selected alternative word, therefore the font size of alternative text can not be adjusted into institute
The font size of determination.
Step 405, in response to receiving preset instructions, it is corresponding that preset instructions are performed to the text being selected in alternative text
Operation.
In the present embodiment, above-mentioned electronic equipment can be in response to receiving preset instructions, to being selected in alternative text
Text perform preset instructions corresponding to operate.Preset instructions can be indicated for carrying out various processing to the text chosen
Instruction, preset instructions can include at least one of following:Duplicate instructions, shearing instruction, instruction is deleted, instruction is highlighted, turns over
Translate instruction.So that preset instructions are duplicate instructions as an example, above-mentioned electronic equipment, can be to alternative text in response to receiving duplicate instructions
The text being selected in this, which performs, replicates operation, if then receiving stickup instruction, can paste the text being replicated.
Step 406, the font size of alternative text is recovered to the font size to adjustment.
In the present embodiment, above-mentioned electronic equipment can after step 405 has performed corresponding to preset instructions operation, or
After receiving preset instructions, the font size of alternative text is recovered to the font size to adjustment.That is selection of the user for alternative text
When operation has been completed, the font size of alternative text is recovered into the font size to adjustment, user can be facilitated to continue to read text.
Step 401, step 402 realize details and technique effect may be referred to explanation in step 201, step 202,
This is repeated no more.
Figure 4, it is seen that compared with embodiment corresponding to Fig. 2, the text editing for terminal in the present embodiment
The flow 400 of method is only less than identified font size in current font size, adjusts the font size of alternative text, being avoided with this need not
The adjustment wanted, further increases text mark efficiency, also add recover the font size of alternative text to adjustment in addition
The step of font size, that is, font size size when user reads text is automatically returned to, reduce user's operation, improve terminal operating
Efficiency.
With further reference to Fig. 5, as the realization to the above method, this application provides a kind of text editing for terminal
One embodiment of device, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and the device specifically can apply to
In various electronic equipments.
As shown in figure 5, the text editing apparatus 500 for terminal of the present embodiment includes:Acquiring unit 501, it is determined that single
Member 502, adjustment unit 503, wherein, acquiring unit 501, in response to detecting the touch for generating text selecting instruction
Operation, obtain the contact area between touch objects and touch-screen;Determining unit 502, for according to the contact area pre-set
With the corresponding relation of font size, it is determined that font size corresponding with acquired contact area;Adjustment unit 503, for according to being determined
Font size adjustment touch-screen in alternative text font size.
In the present embodiment, acquiring unit 501, determining unit 502, the specific processing of adjustment unit 503 may be referred to Fig. 2
Corresponding embodiment step 201, step 202, the detailed description of step 203, will not be repeated here.
In some optional implementations of the present embodiment, adjustment unit 503, including:Subelement is obtained (in figure not show
Go out), the font size current for obtaining alternative text;Subelement (not shown) is adjusted, for small in response to current font size
In identified font size, the font size of alternative text is adjusted to identified font size.
In some optional implementations of the present embodiment, device also includes execution unit (not shown), performs list
First (not shown) is used for:In response to receiving preset instructions, preset instructions are performed to the text being selected in alternative text
Corresponding operation, wherein, preset instructions include at least one of following:Duplicate instructions, shearing instruction, delete instruction, highlight
Instruction, interpretive order.
In some optional implementations of the present embodiment, device also includes recovery unit (not shown), recovers single
First (not shown) is used for:The font size of alternative text is recovered to the font size to adjustment.
In some optional implementations of the present embodiment, device (does not show also including corresponding relation determining unit in figure
Go out), corresponding relation determines to be used for:The historical record associated with target terminal is obtained, historical record includes historical touch operation
Area and font size corresponding with the touch area of historical touch operation are touched, wherein, historical touch operation includes collecting modification
After the operation of alternative text font size, receive for the preset instructions of text that are selected in the alternative text changed it
Before, detect for the touch operation for the alternative text changed, font size bag corresponding to the touch area of historical touch operation
Include amended alternative text font size;Corresponding relation is determined according to historical record.
In some optional implementations of the present embodiment, the touch operation for generating text selecting instruction includes touching
The residence time for the original position that thing contacts in touch objects with touch-screen exceedes the touch operation of preset time threshold;And obtain
Unit 501 is taken further to be configured to:Obtain the mean exposure area between touch objects and touch-screen in the residence time.
In some optional implementations of the present embodiment, pressure sensor is provided with touch-screen, for generating text
The touch that the pressure that the touch operation of selection instruction is included between touch objects and touch-screen exceedes default first pressure threshold value is grasped
Make;And acquiring unit 501 is further configured to:Pressure is in default range of pressure values between acquisition touch objects and touch-screen
Interior mean exposure area, wherein, the pressure upper limit value of range of pressure values is less than first pressure threshold value.
From figure 5 it can be seen that the text editing apparatus 500 in the present embodiment for terminal is by response to detecting use
In the touch operation of generation text selecting instruction, the contact area between touch objects and touch-screen is obtained, then basis is set in advance
The contact area and the corresponding relation of font size put, it is determined that font size corresponding with acquired contact area, finally according to being determined
Font size adjustment touch-screen in alternative text font size, improve the efficiency of text editing.
Below with reference to Fig. 6, it illustrates suitable for for realizing the knot of the computer system 600 of the equipment of the embodiment of the present application
Structure schematic diagram.Equipment shown in Fig. 6 is only an example, the function and use range of the embodiment of the present application should not be brought and appointed
What is limited.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into program in random access storage device (RAM) 603 from storage part 608 and
Perform various appropriate actions and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Penetrated including such as negative electrode
The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 608 including hard disk etc.;
And the communications portion 609 of the NIC including LAN card, modem etc..Communications portion 609 via such as because
The network of spy's net performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 606.Detachable media 611, such as
Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 610, in order to read from it
Computer program be mounted into as needed storage part 608.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium
On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality
To apply in example, the computer program can be downloaded and installed by communications portion 609 from network, and/or from detachable media
611 are mounted.When the computer program is performed by CPU (CPU) 601, perform what is limited in the present processes
Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or
Computer-readable recording medium either the two any combination.Computer-readable recording medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.
The more specifically example of computer-readable recording medium can include but is not limited to:Electrical connection with one or more wires,
Portable computer diskette, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any be included or store
The tangible medium of program, the program can be commanded the either device use or in connection of execution system, device.And
In the application, computer-readable signal media can include believing in a base band or as the data that a carrier wave part is propagated
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium beyond readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by instruction execution system, device either device use or program in connection.Included on computer-readable medium
Program code any appropriate medium can be used to transmit, include but is not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation
The part of one unit of table, program segment or code, a part for the unit, program segment or code include one or more
For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame
The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual
On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also
It is noted that the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, Ke Yiyong
Function as defined in execution or the special hardware based system of operation are realized, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag
Include acquiring unit, determining unit, adjustment unit.Wherein, the title of these units is not formed to the unit under certain conditions
The restriction of itself, for example, acquiring unit is also described as " being used in response to detecting for generating text selecting instruction
Touch operation, obtain the unit of the contact area between touch objects and touch-screen ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be the nonvolatile computer storage media included in device described in above-described embodiment;Can also be
Individualism, without the nonvolatile computer storage media in supplying server.Above-mentioned nonvolatile computer storage media
One or more program is stored with, when one or more of programs are performed by an equipment so that the equipment:Ring
Ying Yu detects the touch operation for generating text selecting instruction, obtains the contact area between touch objects and touch-screen;Root
According to the contact area and the corresponding relation of font size pre-set, it is determined that font size corresponding with acquired contact area;According to institute
The font size of alternative text in the font size adjustment touch-screen of determination.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms
Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature
The other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical scheme that the technical characteristic of energy is replaced mutually and formed.
Claims (16)
1. a kind of method for editing text for terminal, it is characterised in that the terminal includes touch-screen, and methods described includes:
In response to detecting the touch operation for generating text selecting instruction, the contact surface between touch objects and touch-screen is obtained
Product;
According to the contact area and the corresponding relation of font size pre-set, it is determined that font size corresponding with acquired contact area;
The font size of alternative text in the touch-screen is adjusted according to identified font size.
2. according to the method for claim 1, it is characterised in that font size determined by the basis is adjusted in the touch-screen
The font size of alternative text, including:
Obtain the current font size of the alternative text;
It is less than identified font size in response to current font size, the font size of the alternative text is adjusted to identified font size.
3. according to the method for claim 1, it is characterised in that font size determined by the basis is adjusted in the touch-screen
After the font size of alternative text, methods described also includes:
In response to receiving preset instructions, behaviour corresponding to the preset instructions is performed to the text being selected in the alternative text
Make, wherein, the preset instructions include at least one of following:Duplicate instructions, shearing instruction, delete instruction, highlight instruction,
Interpretive order.
4. according to the method for claim 3, it is characterised in that the text to being selected in the alternative text performs
After corresponding operation, methods described also includes:
The font size of the alternative text is recovered into the font size to adjustment.
5. according to the method for claim 1, it is characterised in that the corresponding relation is determined via following steps:
Obtain the historical record that associate with target terminal, touch area that the historical record operates including historical touch and with institute
Font size corresponding to the touch area of historical touch operation is stated, wherein, the historical touch operation includes collecting the alternative text of modification
After the operation of this font size, before receiving the preset instructions for the text being selected in the alternative text changed, detection
To for the touch operation for the alternative text changed, font size corresponding to the touch area of the historical touch operation includes repairing
Alternative text font size after changing;
The corresponding relation is determined according to the historical record.
6. according to the method any one of claim 1-5, it is characterised in that described to be used to generate text selecting instruction
The residence time that touch operation includes the original position that the touch objects contact in the touch objects with the touch-screen exceedes
The touch operation of preset time threshold;And
The contact area obtained between touch objects and touch-screen, including:
Obtain the mean exposure area between the touch objects and the touch-screen in the residence time.
7. according to the method described in claim 1-5, it is characterised in that be provided with pressure sensor, institute on the touch-screen
The pressure that stating the touch operation for generating text selecting instruction is included between the touch objects and the touch-screen exceedes default
First pressure threshold value touch operation;And
The contact area obtained between touch objects and touch-screen, including:
Mean exposure area of the pressure in default range of pressure values between the touch objects and the touch-screen is obtained, its
In, the pressure upper limit value of the range of pressure values is less than the first pressure threshold value.
8. a kind of text editing apparatus for terminal, it is characterised in that the terminal includes touch-screen, and described device includes:
Acquiring unit, in response to detecting the touch operation for generating text selecting instruction, obtaining touch objects with touching
Contact area between screen;
Determining unit, for the corresponding relation according to the contact area that pre-sets and font size, it is determined that with acquired contact surface
Font size corresponding to product;
Adjustment unit, the font size of alternative text in the touch-screen is adjusted for the font size determined by.
9. device according to claim 8, it is characterised in that the adjustment unit, including:
Subelement is obtained, for obtaining the current font size of the alternative text;
Subelement is adjusted, for being less than identified font size in response to current font size, the font size of the alternative text is adjusted
For identified font size.
10. device according to claim 8, it is characterised in that described device also includes execution unit, the execution unit
For:
In response to receiving preset instructions, behaviour corresponding to the preset instructions is performed to the text being selected in the alternative text
Make, wherein, the preset instructions include at least one of following:Duplicate instructions, shearing instruction, delete instruction, highlight instruction,
Interpretive order.
11. device according to claim 10, it is characterised in that described device also includes recovery unit, described to recover single
Member is used for:
The font size of the alternative text is recovered into the font size to adjustment.
12. device according to claim 8, it is characterised in that described device also includes corresponding relation determining unit, described
Corresponding relation determines to be used for:
Obtain the historical record that associate with target terminal, touch area that the historical record operates including historical touch and with institute
Font size corresponding to the touch area of historical touch operation is stated, wherein, the historical touch operation includes collecting the alternative text of modification
After the operation of this font size, before receiving the preset instructions for the text being selected in the alternative text changed, detection
To for the touch operation for the alternative text changed, font size corresponding to the touch area of the historical touch operation includes repairing
Alternative text font size after changing;
The corresponding relation is determined according to the historical record.
13. according to the device any one of claim 8-12, it is characterised in that described to be used to generate text selecting instruction
Touch operation include residence time of original position that the touch objects contact in the touch objects with the touch-screen and surpass
Cross the touch operation of preset time threshold;And
The acquiring unit is further configured to:
Obtain the mean exposure area between the touch objects and the touch-screen in the residence time.
14. according to the device described in claim 8-12, it is characterised in that pressure sensor is provided with the touch-screen,
The touch operation for being used to generate text selecting instruction exceedes in advance including the pressure between the touch objects and the touch-screen
If first pressure threshold value touch operation;And
The acquiring unit is further configured to:
Mean exposure area of the pressure in default range of pressure values between the touch objects and the touch-screen is obtained, its
In, the pressure upper limit value of the range of pressure values is less than the first pressure threshold value.
A kind of 15. equipment, it is characterised in that including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors are real
The now method as described in any in claim 1-7.
16. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor
The method as described in any in claim 1-7 is realized during execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710590253.2A CN107402911A (en) | 2017-07-19 | 2017-07-19 | Method for editing text and device for terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710590253.2A CN107402911A (en) | 2017-07-19 | 2017-07-19 | Method for editing text and device for terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107402911A true CN107402911A (en) | 2017-11-28 |
Family
ID=60402179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710590253.2A Pending CN107402911A (en) | 2017-07-19 | 2017-07-19 | Method for editing text and device for terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107402911A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108776574A (en) * | 2018-06-01 | 2018-11-09 | 咪咕数字传媒有限公司 | Book display method and device and computer readable storage medium |
CN108932102A (en) * | 2018-06-07 | 2018-12-04 | Oppo广东移动通信有限公司 | Data processing method, device and mobile terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102646263A (en) * | 2012-03-06 | 2012-08-22 | 优视科技有限公司 | Scaling regulating method and device |
CN102789360A (en) * | 2012-06-27 | 2012-11-21 | 中兴通讯股份有限公司 | Method and device for text input and display of intelligent terminal |
CN103513921A (en) * | 2012-06-29 | 2014-01-15 | 联想(新加坡)私人有限公司 | Text selection utilizing pressure-sensitive touch |
CN103677636A (en) * | 2013-12-06 | 2014-03-26 | 闻泰通讯股份有限公司 | Electronic device character automatic adjusting system and method |
CN105653016A (en) * | 2014-11-14 | 2016-06-08 | 阿尔卡特朗讯 | Method and device for automatically adjusting presentation style |
CN105867820A (en) * | 2016-03-31 | 2016-08-17 | 百度在线网络技术(北京)有限公司 | Text editing method and device for touch screen |
-
2017
- 2017-07-19 CN CN201710590253.2A patent/CN107402911A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102646263A (en) * | 2012-03-06 | 2012-08-22 | 优视科技有限公司 | Scaling regulating method and device |
CN102789360A (en) * | 2012-06-27 | 2012-11-21 | 中兴通讯股份有限公司 | Method and device for text input and display of intelligent terminal |
CN103513921A (en) * | 2012-06-29 | 2014-01-15 | 联想(新加坡)私人有限公司 | Text selection utilizing pressure-sensitive touch |
CN103677636A (en) * | 2013-12-06 | 2014-03-26 | 闻泰通讯股份有限公司 | Electronic device character automatic adjusting system and method |
CN105653016A (en) * | 2014-11-14 | 2016-06-08 | 阿尔卡特朗讯 | Method and device for automatically adjusting presentation style |
CN105867820A (en) * | 2016-03-31 | 2016-08-17 | 百度在线网络技术(北京)有限公司 | Text editing method and device for touch screen |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108776574A (en) * | 2018-06-01 | 2018-11-09 | 咪咕数字传媒有限公司 | Book display method and device and computer readable storage medium |
CN108932102A (en) * | 2018-06-07 | 2018-12-04 | Oppo广东移动通信有限公司 | Data processing method, device and mobile terminal |
CN108932102B (en) * | 2018-06-07 | 2020-12-08 | Oppo广东移动通信有限公司 | Data processing method and device and mobile terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9612675B2 (en) | Emulating pressure sensitivity on multi-touch devices | |
JP5681150B2 (en) | Terminal device and search service providing method | |
CN103914260B (en) | Control method and device for operation object based on touch screen | |
US10620821B2 (en) | Page sliding method and apparatus | |
US9459786B2 (en) | Systems and methods for sharing a user interface element based on user gestures | |
CN107632895A (en) | A kind of information sharing method and mobile terminal | |
US10656806B2 (en) | Display interface systems and methods | |
CN105867820A (en) | Text editing method and device for touch screen | |
CN107329585A (en) | Method and apparatus for inputting word | |
CN105094841A (en) | Page commenting method and device | |
CN109669617A (en) | Method and apparatus for switching the page | |
CN104571871A (en) | Method and system for selecting files | |
CN105359131B (en) | Tie selection handle | |
CN107402911A (en) | Method for editing text and device for terminal | |
CN107748636A (en) | Picture batch cut-out method, device and terminal | |
CN106354378A (en) | Method and device for quickly selecting multiple targets | |
CN104156157A (en) | Method and device for displaying functional block in webpage | |
CN110110102B (en) | Thinking guide picture slide playing method and device | |
CN103246459A (en) | Information adjusting method and mobile terminal | |
KR20150097250A (en) | Sketch retrieval system using tag information, user equipment, service equipment, service method and computer readable medium having computer program recorded therefor | |
CN114442892A (en) | Page information analysis method and device, electronic equipment and computer readable medium | |
CN109190097B (en) | Method and apparatus for outputting information | |
JP5791668B2 (en) | Information processing apparatus, method, and computer program | |
JP6109889B2 (en) | Information processing apparatus, method, and computer program | |
CN102426517B (en) | Method and equipment for executing tool module in first page container |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171128 |