This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2022-013271 filed Jan. 31, 2022.
The present invention relates to an information processing apparatus, a non-transitory computer readable medium storing a program, and an information processing method.
In WO2004/034278A, in a case where a new text that does not fit in a text input field such as a text box having a fixed size is input, a size of the text is reduced such that the entire input text fits in the text input field.
In a case where a new text that does not fit in the text input field such as a text box with a fixed size is input, a size of the text is considered to be reduced such that the entire input text fits in the text input field. However, in a case where the number of input texts increases, there is a problem that the size of the text becomes too small and readability of an input portion of the text deteriorates.
Aspects of non-limiting embodiments of the present disclosure relate to an information processing apparatus, a non-transitory computer readable medium storing a program, and an information processing method that can maintain, in a case where a new text that does not fit in a text input field having a fixed size is input, readability of an input portion of the text.
Aspects of certain non-limiting embodiments of the present disclosure overcome the above disadvantages and/or other disadvantages not described above. However, aspects of the non-limiting embodiments are not required to overcome the disadvantages described above, and aspects of the non-limiting embodiments of the present disclosure may not overcome any of the disadvantages described above.
According to an aspect of the present disclosure, there is provided an information processing apparatus including a processor configured to, in a case where a new text that does not fit in a text input field with a fixed size is input, not change a size of a text within a preset range and reduce a size of a text other than the text within the preset range, based on an input position at which the text is input, to display all the texts input in the text input field.
Exemplary embodiment(s) of the present invention will be described in detail based on the following figures, wherein:
Next, exemplary embodiments of the present invention will be described in detail with reference to drawings.
The personal computer 10 of the present exemplary embodiment is a device capable of performing text editing in a text input field such as a text box. As shown in
As shown in
The CPU 11a is a processor configured to execute predetermined processing based on a control program stored in the memory 11b or the storage device 11c to control an operation of the personal computer 10. In the present exemplary embodiment, the CPU 11a reads out and executes the control program stored in the memory 11b or the storage device 11c. However, the present invention is not limited thereto. The control program may be provided in a form of being recorded on a computer-readable recording medium. For example, the program may be provided in a form of being recorded on optical disks such as a compact disc (CD)-read only memory (ROM) and a digital versatile disc (DVD)-ROM or in a form of being recorded on semiconductor memories such as a universal serial bus (USB) memory and a memory card. Further, the control program may be acquired from an external apparatus via a communication line connected to the communication IF 11d.
The control unit 31 controls the overall operation of the personal computer 10. The display unit 32 is controlled by the control unit 31 to display various types of information to a user. In the operation input unit 33, various types of operation information performed by the user are input. The data transmission/reception unit 34 transmits/receives data to/from an external device.
In the personal computer 10 of the present exemplary embodiment, the control unit 31 displays a text input field TB (refer to
In a case where a new text that does not fit in the text input field TB (refer to
The control unit 31 may not change a size of a text within a preset range immediately before the input position and reduce a size of a text other than the text within the preset range to display all the texts input in the text input field TB.
The control unit 31 may not change a size of a text within a preset number of texts immediately before the input position and reduce a size of texts other than the text within a preset number of texts to display all the texts input in the text input field TB.
Hereinafter, processing in the personal computer 10 of the present exemplary embodiment will be described in detail.
As shown in
The control unit 31 displays all texts input in the text input field TB in the same text size until the texts cannot fit in the text input field TB. In this case, a text size, a font type, a display color, a typeface, and the like are not particularly limited and can be set randomly. A part (A) in
Therefore, as shown in a part (B) in
A size of one size when the size of the text is changed can be set to any size, for example, 0.5 point, 1 point, or 2 points of a font size. Further, the size of one size when the size of the text is changed may be constant regardless of a current size of the text in the text size change range RC or may be changed according to the current size of the text in the text size change range RC.
In a case where the size of one size is changed, the size of one size when the size of the text is changed may be smaller as the current size of the texts in the text size change range RC is smaller. For example, the size of one size may be set to 2 points in a case where the current size of the texts in the text size change range RC is 20 points or more, set to 1 point in a case where the current size thereof is less than 20 points and 10 points or more, and set to 0.5 points in a case where the current size thereof is less than 10 points.
In a case where a new text is further input at the position of the cursor C from the state of the part (B) of
Processing of the control unit 31 in a case where the size of the texts in the text size change range RC is reduced, then a text in the text input field TB is deleted, and there is a margin for displaying a new text in the text size change range RC is not particularly limited. For example, the following processing can be performed.
Contrary to the above processing, the control unit 31 may expand the size of the texts in the text size change range RC by one size until the texts input in the text input field TB cannot fit in the text input field TB to set the size thereof to the largest size among the sizes that all the texts input in the text input field TB fit in the field.
The control unit 31 may maintain the once reduced size of the texts in the text size change range RC even in a case where there is a margin for displaying a new text in the text size change range RC.
With the above aspect, the readability of the input portion of the text is maintained even in a case where a new text that does not fit in the text input field TB having a fixed size is input.
The texts in the text size maintenance range RP near the cursor C are texts that the user pays particular attention to in a case of inputting a text in the text input field TB. Therefore, in the personal computer 10 of the present exemplary embodiment, the control unit 31 may perform emphasis processing on the texts in the text size maintenance range RP that are not changed in size, as shown in
The control unit 31 may not change a size of texts within the preset number of words immediately before the input position including a word being input and reduce a size of texts other than the texts therewithin to display all the texts input in the text input field TB.
That is, as shown in
An input language in this case is not limited to a language such as English written with a space between words and may be a language written without a space between words such as Japanese. Here, “written with space between words” is a writing method in which a space is inserted in a word separation. In a case where the input language is a language written with a space between words, a word can be identified by a space symbol between texts. Further, in a case where the input language is a language written without a space between words, a word in a sentence may be identified by a known sentence recognition technique.
In this case, the emphasis processing may be also performed on the texts in the text size maintenance range RP, as shown in
In a case of a language in which sentences are separated by a specific symbol, the control unit 31 may not change a size of texts included in a sentence being input and reduce a size of texts other than the texts included in the sentence being input to display all the texts input in the text input field TB. The language in which sentences are separated by a specific symbol is, for example, English in which sentences are separated by a period “.” and Japanese in which sentences are separated by a punctuation mark “∘”. In this case, a range from the position of the cursor C to immediately before the nearest symbol on a front side of the cursor C can be identified as the sentence being input.
That is, as shown in
In this case, the emphasis processing may be also performed on the texts in the text size maintenance range RP, as shown in
In a case of a language in which a part of a sentence is separated by a specific symbol, the control unit 31 may not change a size of texts included in a part of the sentence being input and reduce a size of texts other than the texts included in a part of the sentence being input to display all the texts input in the text input field TB. The language in which a part of the sentence is separated by a specific symbol is, for example, English in which a part of the sentence is separated by a period “.” and a comma “,”, and Japanese in which a part of the sentence is separated by a punctuation mark “∘” and a pause mark “,”. In this case, a range from the position of the cursor C to immediately before the nearest symbol on a front side of the cursor C can be identified as a part of the sentence being input.
That is, as shown in
In this case, the emphasis processing may be also performed on the texts in the text size maintenance range RP, as shown in
Next, a flow of processing at the time of text input in the personal computer 10 of the present exemplary embodiment will be described with reference to a flowchart of
In a case where detection is made in step S11 that a new text is input to the text input field TB, the control unit 31 determines whether or not all texts input to the text input field TB fit in the text input field TB in step S12.
In a case where determination is made in step S12 that all the texts input in the text input field TB fit in the text input field TB, the control unit 31 transitions immediately before step S11 and waits until a next text is detected.
In a case where determination is made in step S12 that all the texts input in the text input field TB do not fit in the text input field TB, the control unit 31 reduces the size of the texts in the text size change range RC of the text input field TB by one size in step S13.
Next, in step S14, the control unit 31 determines whether or not all the texts input in the text input field TB fit in the text input field TB.
In a case where determination is made in step S14 that all the texts input in the text input field TB fit in the text input field TB, the control unit 31 transitions immediately before step S11 and waits until a next text is detected.
In a case where determination is made in step S12 that all the texts input in the text input field TB do not fit in the text input field TB, the control unit 31 transitions to step S13. The control unit 31 repeats steps S13 and S14 until all the texts input in the text input field TB fit in the text input field TB.
Although the data processing system of an exemplary embodiment of the present invention has been described above, the present invention is not limited to the above exemplary embodiment and may be changed as appropriate.
In the embodiments above, the term “processor” refers to hardware in a broad sense. Examples of the processor include general processors (e.g., CPU: Central Processing Unit) and dedicated processors (e.g., GPU: Graphics Processing Unit, ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, and programmable logic device).
In the embodiments above, the term “processor” is broad enough to encompass one processor or plural processors in collaboration which are located physically apart from each other but may work cooperatively. The order of operations of the processor is not limited to one described in the embodiments above, and may be changed.
The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2022-013271 | Jan 2022 | JP | national |