CN107025895B - Editing apparatus, printing apparatus, control method, and storage medium - Google Patents

Editing apparatus, printing apparatus, control method, and storage medium Download PDF

Info

Publication number
CN107025895B
CN107025895B CN201610862367.3A CN201610862367A CN107025895B CN 107025895 B CN107025895 B CN 107025895B CN 201610862367 A CN201610862367 A CN 201610862367A CN 107025895 B CN107025895 B CN 107025895B
Authority
CN
China
Prior art keywords
character
display area
characters
display
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610862367.3A
Other languages
Chinese (zh)
Other versions
CN107025895A (en
Inventor
宫下智基
加古径吾
河合润也
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Publication of CN107025895A publication Critical patent/CN107025895A/en
Application granted granted Critical
Publication of CN107025895B publication Critical patent/CN107025895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/34Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators for rolling or scrolling
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/42Scales and indicators, e.g. for determining side margins
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/08Cursor circuits
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/22Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory
    • G09G5/32Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory with means for controlling the display position

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Printers Characterized By Their Purpose (AREA)
  • User Interface Of Digital Computer (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Document Processing Apparatus (AREA)

Abstract

In the editing apparatus, the printing apparatus, and the control method according to the present invention, a plurality of characters are displayed in a left-right direction from the left end to the right end of the text display area of the display (S19). A cursor indicating a cursor position is also displayed in the text display area (S11, S19). When the cursor position is moved, if it is determined that at least a part of the characters adjacent to the cursor position in the left-right direction is located in the text display region, the text is moved in the left-right direction by the width (first width or second width) of the characters (S18, S23). Thereby, the entire character adjacent to the cursor position is displayed in the text display area (S19).

Description

Editing apparatus, printing apparatus, control method, and storage medium
Technical Field
The invention relates to an editing apparatus and a printing apparatus having a display unit, and a control method.
Background
An editing apparatus having a display unit is known. For example, a mobile phone device disclosed in japanese patent application laid-open No. 2000-276126 includes a display unit. The mobile phone device displays characters input through the key input unit on the display screen of the display unit. A mobile phone device in a region using characters with a narrow character width (so-called half-angle characters) and characters with a wide character width (so-called full-angle characters) is configured to be able to display both the half-angle characters and the full-angle characters on a display screen. In such a display screen of a mobile phone device, if a space in which only a character having a narrow character width can be displayed exists at the end of a line and a character having a wide character width is input in a state in which a cursor is displayed at the end of the line, a space is inserted at the position of the cursor and the character having a wide character width is inserted in the next line.
Disclosure of Invention
It is desirable that even in a state where only characters having a narrow character width can be displayed completely at the end of a line, characters having a wide character width can be displayed at the end of the line. In this case, there is a possibility that characters having a wide character width cannot be accommodated in the display screen and a part of the characters cannot be displayed. When a part of a character adjacent to a position (editing position) where the character can be input is not displayed on the display screen, the user may have difficulty in grasping the character.
An object of the present invention is to provide an editing apparatus, a printing apparatus, and a control program that enable a user to easily grasp characters adjacent to a position (editing position) where characters such as letters, numerals, and signs can be input.
An editing apparatus according to a first aspect of the present invention includes: a display unit capable of displaying an image; a first display control unit that displays a plurality of first characters, which are a plurality of characters represented by a plurality of character data, in a display area of the display unit, from a first end, which is one end in a first direction, of the display area to a second end, which is the other end in the first direction, of the display area, the first character being arranged in the first direction; a second display control unit that displays, in the display area, a mark indicating an edit position that is a position where a character can be input by an operation on the input unit; and a third display control unit configured to, when it is determined that at least a part of a second character that is a character adjacent to the moved editing position in the first direction is located outside the display area when the editing position is moved, move the plurality of first characters in the first direction to the display area side by an amount of width in the first direction of the at least a part of the second character, and display the entire second character in the display area.
According to the first aspect, the editing apparatus can display the entire second character in the display area regardless of the width of the second character in the first direction. The user can easily grasp the second character by observing the entire second character.
A printing apparatus according to a second aspect of the present invention includes the editing apparatus according to the first aspect and a printing unit configured to print the plurality of first characters on a print medium. The printing apparatus can bring about the same effects as the editing apparatus of the first embodiment. In addition, the printing apparatus can print characters input in accordance with an operation on the input portion to a printing medium.
A control method according to a third aspect of the present invention is a control method for an editing apparatus including a display unit capable of displaying an image, the method including: a first display control step of displaying a plurality of first characters, which are a plurality of characters represented by a plurality of character data, in a display area of the display unit, from a first end, which is one end in a first direction, of the display area to a second end, which is the other end in the first direction, of the display area, in a line in the first direction; a second display control step of displaying, in the display area, a mark indicating an edit position which is a position where a character can be input by an operation on the input unit; and a third display control step of, when it is determined that at least a part of a second character that is a character adjacent to the moved editing position in the first direction is located outside the display area when the editing position is moved, moving the plurality of first characters in the first direction to the display area side by an amount of width in the first direction of the at least a part of the second character, and displaying the entire second character in the display area. According to the third aspect, the same effects as those of the first aspect can be obtained.
Drawings
Fig. 1 is a perspective view of the printing apparatus 1 in a state where the cover 6 is closed.
Fig. 2 is a perspective view of the printing apparatus 1 and the tape cassette 30 in a state where the cover 6 is opened.
Fig. 3 is a block diagram showing an electrical configuration of the printing apparatus 1.
Fig. 4 is a flowchart of the main process.
Fig. 5 is a flowchart of the scroll processing.
Fig. 6 is a flowchart of the left side checking process.
Fig. 7 is a flowchart of the right-side inspection processing.
Fig. 8 is a flowchart of the display process.
Fig. 9 is a flowchart of the cursor movement process.
Fig. 10 is a flowchart of the cursor left movement process.
Fig. 11 is a flowchart of the cursor right movement process.
Fig. 12 is a flowchart of the on-cursor movement process.
Fig. 13 is a flowchart of the under-cursor movement process.
Fig. 14 is an explanatory diagram of a character 200 represented by character data and a character 210 represented by display data.
Fig. 15 is an explanatory diagram of a character 300 represented by character data and a character 310 represented by display data.
Fig. 16 is a diagram showing display examples 111 to 115 of characters and a cursor 102 displayed in the text display area 100.
Fig. 17 is a diagram showing an example of display 121 of the characters and the cursor 102 displayed in the text display area 100.
Detailed Description
Embodiments embodying the present invention will be described with reference to the accompanying drawings. The drawings referred to are for explaining the technical features that can be adopted in the present invention, and the configuration of the apparatus and the like described are not limited to these, and are merely illustrative examples.
Referring to fig. 1 and 2, a schematic configuration of the printing apparatus 1 will be described. In the following description, the upper right, lower left, lower right, upper left, upper right, and lower sides in fig. 1 and 2 are referred to as the rear side, front side, right side, left side, upper side, and lower side of the printing apparatus 1, respectively.
The printing apparatus 1 of the present embodiment is an apparatus for printing characters on a tape-shaped printing medium using ink. As shown in fig. 1, a keyboard 3 is provided on the upper surface of the printing apparatus 1. The keyboard 3 includes a plurality of character keys, a delete key, a confirm key, and the like. The character keys are used for inputting characters such as characters, numbers, signs and the like. That is, the characters include letters, numbers, symbols, foreign language, spaces, and the like that can be expressed by a character code. In the present embodiment, the characters include 2 types of characters having a narrow width (hereinafter, referred to as half-character characters) and characters having a wide width (hereinafter, referred to as full-character characters). A function key group 4 such as a power switch, cursor keys, and use keys is provided on the rear side (upper right side of the drawing) of the keyboard 3. The cursor keys comprise a left key, a right key, an upper key and a lower key. The use keys include a print key, a cancel key, and the like. In the following description, the keyboard 3 and the function key group 4 are collectively referred to as an operation unit 2. A display 5 is provided on the rear side of the function key group 4. An openable and closable cover 6 is provided at the rear of the upper surface of the printing apparatus 1. A tray 7 for receiving a printed printing medium cut by a cutting mechanism (not shown) described later is provided at the rear left corner of the printing apparatus 1.
As shown in fig. 2, a cartridge mounting portion 8 to which the tape cartridge 30 is attached and detached is formed on the rear side of the monitor 5. The tape cassette 30 of the present embodiment includes a cassette case as a substantially rectangular parallelepiped (box-shaped) housing. A tape-shaped printing medium, an ink ribbon used for printing, and the like are housed inside the cartridge case. The tape cassette 30 is of a stacked type, a receiving type, a tube type, or the like. In the printing apparatus 1, the tape cassette 30 mounted in the cassette mounting portion 8 is used to print a print medium.
The cartridge mounting portion 8 is provided with a drive shaft 11, a take-up shaft 9, a thermal head 10 (see fig. 3), and the like. The drive shaft 11 is used to convey a printing medium. The take-up shaft 9 is used to take up a used ink ribbon. The thermal head 10 prints on a print medium. In the present embodiment, the thermal head 10 prints the conveyed printing medium with an unused ink ribbon at the printing position. A cutting mechanism (not shown) is provided downstream of the printing position in the transport direction of the printing medium. The cutting mechanism cuts the printing medium to separate the printed portion from the unused portion.
Referring to fig. 3, an electrical configuration of the printing apparatus 1 is explained. As shown in fig. 3, the printing apparatus 1 includes a control circuit unit 400 formed on a control board. The control circuit unit 400 includes a CPU401, a ROM402, a RAM404, a flash memory 410, an input/output interface 411, and the like, and is connected via a data bus.
The ROM402 stores various programs executed by the CPU401 for controlling the printing apparatus 1. The RAM404 stores temporary data. A plurality of storage areas such as a text buffer, a display buffer, and a print buffer are provided in the RAM 404. The text data is stored in a text buffer. The text data represents text including at least one character input via the character keys. The text data includes character data. The character data represents a character. Display data for displaying characters in the display 5 is stored in the display buffer. Further, a mark indicating a space is displayed at a position where the space exists. The mark indicating the blank may not be displayed. Print data as a print object is stored in the print buffer. Various kinds of arithmetic data and the like are stored in other storage areas.
The flash memory 410 stores character data of each character, various setting values, and the like. The character data also indicates a character width and a character height. In the present specification, a term such as a character refers to a rectangular region including characters, numerals, a symbol character, and the like, which are processing units in printing and display. The character width indicates a width in the first direction of the character (rectangular area). The character height represents the height in the second direction of the character (rectangular area). The second direction is a direction orthogonal to the first direction. The first direction is a direction in which characters input in a case where a plurality of characters are sequentially input via character keys are arranged. Further, in the present embodiment, characters can be input in a plurality of lines. Here, the first direction is a direction in which a plurality of characters are arranged in each line in the text display area 100 (see fig. 16) of the editing screen displayed on the display 5, and a plurality of lines are arranged in the second direction. The text display area 100 is a predetermined area on the display 5, and text within a display range, which will be described later, of the text is displayed in the text display area 100.
The input/output interface 411 is connected to the operation unit 2, a Liquid Crystal Driver Circuit (LCDC)405, driver circuits 406, 407, and 408, and the like. The LCDC405 has a video RAM (not shown) for outputting display data to the display 5. The drive circuit 406 is an electronic circuit for driving the thermal head 10. The drive circuit 407 is an electronic circuit for driving the belt transport motor 24 that rotates the winding shaft 9 and the drive shaft 11. The drive circuit 408 is an electronic circuit for driving the cutter motor 25 for operating the cutting mechanism (not shown).
The main processing of the present embodiment will be described with reference to fig. 4 to 16. The right, left, upper, and lower sides of fig. 14 are the right, left, upper, and lower sides of the characters 200 and 210, respectively. The right, left, upper, and lower sides of fig. 15 are referred to as the right, left, upper, and lower sides of the characters 300 and 310, respectively. The right, left, upper, and lower sides of fig. 16 are respectively the right, left, upper, and lower sides of the text display area 100 and the text 101. In the present embodiment, the first direction in the text display area 100 is the left-right direction. In the present embodiment, the second direction in the text display area 100 is the up-down direction.
When the power of the printing apparatus 1 is turned on, the CPU401 starts the main process shown in fig. 4 by executing the program stored in the ROM 402. As shown in fig. 4, when the main process is started, the CPU401 performs an initialization process (S11). In S11, the CPU401 clears the RAM 404. Thereafter, the CPU401 causes the display 5 to display an editing screen. The CPU401 displays a cursor at the left end of the text display area 100 of the editing screen. The cursor is a mark indicating a cursor position as a position (editing position) where a character can be input. In the present embodiment, as shown by the cursor 102 illustrated in fig. 16, the cursor is a rod-shaped mark extending in the second direction. In the present embodiment, a character is input on the right side of the cursor position, and when a character is input, the cursor position moves to the right side of the input character.
After executing S11, the CPU401 determines whether a key input is made (S13). When the operation of the operation unit 2 is detected, the CPU401 determines that a key input has been made. If no key input is made (S13: NO), the CPU401 repeats S13. When the key input is made (S13: "YES"), the CPU401 judges whether the operated key is a character key or a delete key (S15).
If the operated key is a character key or a delete key (S15: yes), the CPU401 creates or edits a text in accordance with the operated key (S17). Hereinafter, the creation or editing of a text is simply referred to as "text editing". When a character key is operated, the CPU401 receives an input of a character in accordance with the operated character key. When the delete key is operated, CPU401 accepts deletion of a character adjacent to the cursor position. In the present embodiment, the CPU401 receives deletion of a character on the left side of the cursor position. The CPU401 may receive deletion of a character on the right side of the cursor position. The CPU401 stores text data representing edited text in a text buffer of the RAM 404. After executing S17, the CPU401 executes scroll processing (S18).
Referring to fig. 5, the scroll processing is explained. First, the CPU401 determines whether a character is input in the editing of the text in S17 (S31). When the key whose operation is detected in S13 is the delete key, the CPU401 determines that no character is input and the character is deleted (S31: no). In this case, the cursor position is moved from the right side to the left side of the deleted character by the amount of width of the deleted character. The CPU401 executes the left side check processing (refer to fig. 6) (S33). On the other hand, in the case where the key whose operation is detected in S13 is a character key, the CPU401 determines that a character is input (S31: YES). In this case, the cursor position moves to the right of the input character. The CPU401 executes the right side check processing (refer to fig. 7) (S35).
Referring to fig. 6, the left side check processing is explained. First, the CPU401 determines whether the moved cursor position is located at the left end of the text display area 100 (S81). When the moved cursor position is located at the left end of the text display area 100 (S81: yes), the CPU401 refers to the text data and determines whether or not a character exists on the left side of the cursor position in the text (S83). When there is no character on the left side of the cursor position (S83: NO), the CPU401 ends the left side checking process. When a character exists on the left side of the cursor position (S83: YES), the CPU401 judges whether or not the character is a character of full-size display (displayed as full-size characters) (S85).
In the case where the character is a character displayed in half-angle (displayed as a half-angle character) (S85: NO), the character is displayed in a first width and a predetermined height. The first width is a predetermined width in a first direction of the displayed character. The predetermined height is a predetermined height in a second direction of the displayed character. In the case where the character is a character displayed at full angle (S85: YES), the character is displayed at the second width and at the predetermined height. The second width is a predetermined width in the first direction of the displayed character. The second width is greater than the first width. For example, the predetermined height is 2 times the first width, equal to the second width. In this case, the second width is also 2 times the first width.
In the case where the ratio of the character height to the character width of the character is smaller than the threshold, the CPU401 determines that the character is a character displayed at full angle (S85: YES). In this case, the CPU401 relatively moves the entire text to the right side with respect to the display range by the second width amount (S87). The display range refers to a range that can be displayed in the text display area 100. When the ratio of the character height to the character width of the character is equal to or greater than the threshold value, the CPU401 determines that the character is a character displayed at half-angle (S85: NO). In this case, the CPU401 relatively moves the entire text to the right side with respect to the display range by the first width amount (S89).
In S81, if the moved cursor position is not located at the left end of the text display area 100 (S81: no), the CPU401 determines whether a part of the character on the left side of the cursor position is located outside the text display area 100 (S91). If a part of the characters on the left side of the cursor position is located outside the text display area 100 (S91: yes), the CPU401 relatively moves the entire text to the right side with respect to the display range by the first amount of width (S93). That is, when a part of the character displayed at the full angle on the left side of the cursor position is located outside the display area 100, the entire text is moved rightward so that the entire character is displayed in the display area 100. When the whole of the characters on the left side of the cursor position is located within the text display area 100 (S91: no), the CPU401 ends the left side checking process. In addition, after executing S87, S89, or S93, the CPU401 ends the left side check processing.
Next, the right side inspection process will be described with reference to fig. 7. First, the CPU401 determines whether the moved cursor position is located at the right end of the text display area 100 (S111). When the moved cursor position is located at the right end of the text display area 100 (S111: yes), the CPU401 refers to the text data and determines whether or not a character is present on the right side of the cursor position in the text (S113). When there is no character on the right side of the cursor position (S113: NO), the CPU401 ends the right side check processing. When a character exists on the right side of the cursor position (S113: YES), the CPU401 judges whether or not the character is a character displayed in full angle (S115).
In the case where the ratio of the character height to the character width of the character is smaller than the threshold, the CPU401 determines that the character is a character displayed at full angle (S115: YES). In this case, the CPU401 relatively moves the entire text to the left with respect to the display range by the second width amount (S117). When the ratio of the character height to the character width of the character is equal to or greater than the threshold value, the CPU401 determines that the character is a character displayed at half-angle (S115: NO). In this case, the CPU401 relatively moves the entire text to the left with respect to the display range by the first width amount (S119).
In S111, if the moved cursor position is not located at the right end of the text display area 100 (S111: no), the CPU401 determines whether or not a part of the character located on the right side of the cursor position is located outside the text display area 100 (S121). When a part of the character on the right side of the cursor position is located outside the text display area 100 (S121: YES), the entire text is moved to the left relative to the display range by a first width amount (S123), that is, when a part of the character displayed at all corners on the right side of the cursor position is located outside the display area 100, the text is moved to the left so that the entire character is displayed in the display area 100. If the entirety of the characters on the right side of the cursor position is located within the text display area 100 (S121: NO), the CPU401 ends the right side check processing. In addition, after executing S117, S119, or S123, the CPU401 ends the right side check processing.
After executing the left check process (S33) or the right check process (S35), the CPU401 ends the scroll process and returns to the main process (see fig. 4). The CPU401 executes the display processing after returning to the main processing (S19).
With reference to fig. 8, the display processing is explained. In the display processing, at least a part of characters of the edited text are displayed in the text display area 100. At least 1 line of characters can be displayed within the text display area 100. A plurality of characters of the same line are displayed in a state of being arranged in a first direction (left-right direction) from the left end toward the right end of the text display area 100. As described above, in the present embodiment, a plurality of lines of characters can be displayed in the text display area 100.
When the display processing is executed, first, the CPU401 performs initialization processing (S41). In S41, the CPU401 clears the display buffer of the RAM 404. Next, the CPU401 determines whether characters are displayed in all lines of the text display area 100 (S43). When a line in which characters are not displayed exists in the text display area 100 (S43: no), the CPU401 refers to the display buffer and determines whether or not a space in which characters can be displayed exists in the line currently being displayed in the text display area 100 (the line in which the cursor is located) (S45). Hereinafter, a line that is a current display object is referred to as a "display object line".
In the display processing, character data of characters corresponding to a display range is acquired for each character from text data stored in a text buffer. Display data is stored in the display buffer based on the acquired character data. In round 1 of the display processing, no display data is stored in the display buffer. Therefore, no character is displayed in the text display area 100 (S43: NO). In addition, a space in which characters can be displayed exists in the display object line (line 1) in the text display area 100 (S45: YES).
When there is a space in the display object line in which characters can be displayed (S45: YES), the CPU401 judges whether all characters in the line as the current processing object in the text represented by the text data are displayed in the display object line (S47). In the 1 st round of the display processing, the line as the current processing target is the 1 st line in the display range. In round 1 of the display processing, none of the characters in the line as the current processing object is displayed in the display object line (S47: NO).
In the case where all the characters in the line as the current processing object are not displayed, that is, in the case where at least one character is not displayed (S47: NO), the CPU401 determines whether or not the ratio of the character height to the character width of the character to be displayed next is equal to or more than a threshold (S49). Hereinafter, the character to be displayed next is referred to as a "display target character". In S49, the CPU401 acquires character data of the display target character from the text data. The CPU401 refers to the acquired character data and determines whether or not the ratio of the character height to the character width of the display target character is equal to or greater than a threshold value. The user can set the threshold value in advance by inputting the threshold value using the operation unit 2. The set threshold value is stored in the flash memory 410. Default values for the threshold values may also be stored in flash memory 410. The threshold value is for example 2.
In the case where the ratio is the threshold value or more (S49: YES), the CPU401 determines that the display object character is displayed in the text display area 100 in a half-angle display manner (in the first width and the predetermined height) (S51). In this case, the CPU401 generates display data in which a first width and a predetermined height are set for the display target character, and stores the display data in the display buffer. In the case where the ratio is smaller than the threshold (S49: NO), the CPU401 determines that the display object character is displayed in the text display area 100 in a full-angle display manner (in the second width and the predetermined height) (S53). In this case, the CPU401 generates display data in which the second width and the predetermined height are set for the display target character, and stores the display data in the display buffer.
After executing S51 or S53, the CPU401 displays the display object characters in the text display area 100 according to the display data stored in the display buffer (S55). After executing S51, the CPU401 displays the display object character in a half-angle display manner (with a first width and a predetermined height). After executing S53, the CPU401 displays the display object character in a full-angle display manner (with a second width and a predetermined height). When the cursor position is adjacent to the display target character, the CPU401 sets the corresponding position in the text display region 100 as the cursor position and displays the cursor. For example, in the case where the cursor position is on the right side of the display object character in the display data, the CPU401 displays the cursor on the right side of the display object character displayed in the text display area 100.
Referring to fig. 14, an example of characters displayed in the case where S49, S51, S55 is performed is explained. As illustrated in fig. 14, the character data of the character 200 of the symbol indicates a character width W11 and a character height H11. The ratio of the character height H11 to the character width W11 is greater than or equal to a threshold value (e.g., 2) (S49: YES). In this case, the CPU401 generates display data of the character 210 in which the first width W21 and the predetermined height H21 are set (S51). The CPU401 displays the character 210 in the text display area 100 with the first width W21 and the predetermined height H21 (S55).
Further, in S51, the CPU401, in generating the display data of the character 210, includes the character 200 in the rectangular region of the character 210 without changing the ratio of the character height H11 to the character width W11 thereof. Therefore, as illustrated in fig. 14, a margin may be provided on the left and right sides of the character 210.
Referring to fig. 15, an example of characters displayed in the case where S49, S53, S55 is performed is explained. As illustrated in fig. 15, the character data of the foreign character 300 represents the character width W12 and the character height H12. The ratio of the character height H12 to the character width W12 is less than the threshold (e.g., 2) (S49: NO). In this case, the CPU401 generates display data of the character 310 in which the second width W22 and the predetermined height H21 are set (S53). The CPU401 displays the character 310 in the text display area 100 with the second width W22 and the predetermined height H21 (S55).
Further, in S53, the CPU401, in generating the display data of the character 310, includes the character 300 in the rectangular region of the character 310 without changing the ratio of the character height H12 to the character width W12. Therefore, as illustrated in fig. 15, a margin may be provided above and below the character 310.
After executing S55, the CPU401 moves the position of the next display object character to the right by the amount of width of the current display object character in the text display area 100 (S57). In a case where the current display object character is displayed in the half-angle manner (in the first width and the predetermined height) in S55, the CPU401 shifts the position of the next display object character by the first width amount in S57. In a case where the current display object character is displayed in a full-angle manner (with the second width and the predetermined height) in S55, the CPU401 shifts the position of the next display object character by the second width amount in S57.
After executing S57, the CPU401 returns the process to S45. When there is no space in the display object line in which characters can be displayed (S45: no), the CPU401 sets the display object line to the next line (S59). Further, when all the characters in the line to be currently processed in the text represented by the text data are displayed (S47: YES), the CPU401 sets the line to be displayed as the next line (S59). After executing S59, the CPU401 returns the process to S43.
In S43, if characters are displayed in the display area 100 in all the lines in the text display area 100 (S43: yes), the CPU401 ends the display processing and returns to the main processing (see fig. 4). When the display target line set in S59 cannot be displayed in the text display area 100, the CPU401 determines that characters are displayed in all lines in the text display area 100. For example, when 2 lines of text can be displayed in the text display area 100 and the display object line set in S59 is the 3 rd line, the display object line (the 3 rd line) is not displayed in the text display area 100. In this case, the CPU401 determines that characters are displayed in all lines (2 lines) in the text display area 100.
After returning to the main process, the CPU401 determines whether or not a key input has been made (S13). When a key input is made and the operated key is not either the character key or the delete key (S13: YES, S15: NO), the CPU401 determines whether the operated key is a cursor key (S21). In the case where the operated key is a cursor key (S21: YES), the CPU401 executes cursor movement processing (S23).
With reference to fig. 9, the cursor movement process is explained. First, the CPU401 determines whether the operated cursor key is the left key. The left key is used to indicate movement of the cursor position to the left. In the case where the operated cursor key is the left key (S61: YES), the CPU401 executes cursor left movement processing (S62).
Referring to fig. 10, the cursor left movement process is explained. First, the CPU401 determines whether there is a character on the left side of the cursor position in the text display area 100 (S71). When there is a character on the left side of the cursor position (S71: YES), the CPU401 moves the cursor position to the left by the amount of width of the character on the left side of the cursor position (S73). The CPU401 executes the left side check processing (refer to fig. 6) (S75). When there is no character on the left side of the cursor position (S71: no) or after the left side check processing is executed (S75), the CPU401 ends the cursor left movement processing and returns to the cursor movement processing (refer to fig. 9).
In S61, if the operated cursor key is not the left key (S61: NO), the CPU401 determines whether the operated cursor key is the right key (S63). The right key is used to indicate movement of the cursor position to the right. In the case where the operated cursor key is the right key (S63: YES), the CPU401 executes cursor right movement processing (S64).
With reference to fig. 11, the cursor right movement process is explained. First, the CPU401 determines whether a character exists on the right side of the cursor position in the text display area 100 (S101). When there is a character on the right side of the cursor position (S101: "YES"), the CPU401 moves the cursor position to the right by the amount of width of the character on the right side of the cursor position (S103). The CPU401 executes the right side check processing (refer to fig. 7) (S105). When there is no character on the right side of the cursor position (S101: NO) or after the right side check processing is executed (S105), the CPU401 ends the cursor right movement processing and returns to the cursor movement processing (refer to FIG. 9).
In S63, if the operated cursor key is not the right key (S63: no), the CPU401 determines whether the operated cursor key is the up key (S65). The up key is used to indicate upward movement of the cursor position. In the case where the operated cursor key is the up key (S65: YES), the CPU401 executes the cursor up movement process (S66).
Referring to fig. 12, the on-cursor movement process is explained. First, the CPU401 refers to text data and determines whether or not a line of characters exists above the cursor position in the text (S131). When a line of characters exists on the upper side of the cursor position (S131: YES), the CPU401 judges whether or not the end portion on the right side of the upper line is on the right side of the cursor position (S133). When there is no character row on the upper side of the cursor position (S131: no) or when the end portion on the right side of the upper row is not on the right side of the cursor position (S133: no), the CPU401 ends the on-cursor movement processing and returns to the cursor movement processing (see fig. 9).
When the end portion on the right side of the upper row is positioned on the right side of the cursor position (S133: YES), the CPU401 determines whether or not the cursor position overlaps with the character when moving the cursor position upward (S135). For example, when the center in the left-right direction of a character displayed at full angle is positioned directly above the cursor position, the CPU401 determines that the cursor position overlaps the character.
When the cursor position does not overlap the character after moving the cursor position upward (S135: NO), the CPU401 moves the cursor position upward by 1 line (S141). When the cursor position overlaps the character after moving the cursor position upward (S135: YES), the CPU401 moves the cursor position upward by 1 line (S137). Thereafter, the CPU401 moves the cursor position to the left side of the character overlapping the cursor position (S139). For example, in a case where the cursor position is located at the center in the left-right direction of the character displayed at full angle, the CPU401 moves the cursor position to the left by the amount of width of the character displayed at half angle.
After executing S139 or S141, the CPU401 executes the left side check process (see fig. 6) (S143). Thereafter, the CPU401 executes a right side check process (refer to fig. 7) (S145). Thereafter, the CPU401 ends the on-cursor movement processing and returns to the cursor movement processing (see fig. 9).
In the case where the cursor key operated in S65 is not the up key (S65: NO), the cursor key operated is the down key. In this case, the CPU401 executes the cursor downward movement process (S67).
Referring to fig. 13, the under cursor movement process is explained. First, the CPU401 refers to the text data and determines whether or not a line of characters exists below the cursor position in the text (S151). When a line of characters exists below the cursor position (S151: "YES"), the CPU401 determines whether or not the end of the right side of the line on the lower side is located on the right side of the cursor position (S153). If there is no line of characters below the cursor position (S151: no) or if the end on the right side of the line on the lower side is not on the right side of the cursor position (S153: no), the CPU401 ends the under-cursor movement processing and returns to the cursor movement processing (see fig. 9).
When the end portion on the right side of the lower row is positioned on the right side of the cursor position (S153: yes), the CPU401 determines whether or not the cursor position overlaps with the character when moving the cursor position downward (S155). When the cursor position does not overlap with the character when the cursor position is moved downward (S155: NO), the CPU401 moves the cursor position downward by 1 line (S161). When the cursor position overlaps the character when the cursor position is moved down (S155: YES), the CPU401 moves the cursor position down 1 line (S157). Thereafter, the CPU401 moves the cursor position to the left side of the character overlapping the cursor position (S159).
After executing S159 or S161, the CPU401 executes the left side check process (see fig. 6) (S163). Thereafter, the CPU401 executes a right side check process (refer to fig. 7) (S165). Thereafter, the CPU401 ends the on-cursor movement processing and returns to the cursor movement processing (see fig. 9).
After executing the cursor left movement process (S62), the cursor right movement process (S64), the cursor up movement process (S66), or the cursor down movement process (S67), the CPU401 ends the cursor movement process, returning to the main process (refer to fig. 4).
After returning to the main process, the CPU401 executes a display process (see fig. 8) (S19). After executing the display processing, the CPU401 returns the processing to S13. When a key input is made and the operated key is not either the character key or the delete key (S13: YES, S15: NO), the CPU401 determines whether the operated key is a cursor key (S21). In the case where the operated key is also not the cursor key (S21: NO), the CPU401 judges whether the operated key is the print key (S25).
In the case where the operated key is a print key (S25: YES), the CPU401 executes print processing (S27). In detail, the CPU401 generates print data from the text data and stores the print data in the print buffer. The CPU401 controls the driving circuits 406 and 407 according to print data. Thereby, the drive shaft 11 and the take-up shaft 9 are rotated. In addition, the heating elements of the thermal head 10 are selectively and intermittently energized. Thereby, the printing medium and the ink ribbon are conveyed, and the text is printed on the printing medium. After executing S27, the CPU401 returns the process to S13.
In S25, if the operated key is not a print key (S25: no), the operated key is a key other than the character key, the delete key, the cursor key, and the print key among the keys of the operation section 2. In this case, the CPU401 executes processing corresponding to the operated key (S29). After executing S29, the CPU401 returns the process to S13. When the printing apparatus 1 is powered off, the CPU401 ends the main process.
Display examples 111 to 115 shown when the main process (see fig. 4) is executed will be described with reference to fig. 16. In display examples 111 to 115, the text 101 is a text created by inputting characters via character keys. Text 101 includes the character "1A 2345B 678" in line 1 and the character "C9012 DEF" in line 2. The numbers included in the text 101 are displayed in a half-angle manner (with a first width W21 and a predetermined height H21). The letters included in the text 101 are displayed in a full-angle manner (with a second width W22 and a predetermined height H21). Note that the dotted lines surrounding the respective characters are illustrated to show the size of the respective characters, and are not displayed on the display 5.
In display example 111, the cursor 102 is displayed between characters "9" and "0" on line 2. In this state, the left key is pressed (S13, S15: NO, S21: YES, S61: YES in FIG. 9). In this case, as shown in the display example 112, the cursor 102 is moved to the left of the character "9" (S71: "YES" of FIG. 10, S73, S19 of FIG. 4). Further, by relatively moving the text 101 by the width amount of the character of the full angle to the right with respect to the display range, the character "C" on the left side of the moved cursor 102 is displayed in the text display area 100 (S81: "YES", S83: "YES", S85: "YES", S87, S19 of FIG. 4).
In the state shown in display example 112, the up key is pressed (S13, S15: "NO", S21: "YES" in FIG. 4, S61: "NO", S63: "NO", S65: "YES" in FIG. 9). In this case, as shown in the display example 113, the cursor 102 is moved up 1 line, and is moved to the left side of the character "a". (S131: "YES" of FIG. 12, S133: "YES", S135: "YES", S137, S139, S143, S145, S19 of FIG. 4).
In the state shown in display example 113, the right key was pressed 5 times (S13, S15: "NO", S21: "YES" of FIG. 4, S61: "NO", S63: "YES" of FIG. 9). In this case, as shown in display example 114, the cursor 102 is moved rightward by an amount of 5 characters, between the characters "5" and "B" (S101: "YES" of FIG. 11, S103, S19 of FIG. 4). Further, the character "B" on the right side of the moved cursor 102 is displayed in its entirety in the text display area 100 by moving the text 101 to the left side relative to the display range by the width amount of the character of the half angle (S111: "NO", S121: "YES", S123, S19 of FIG. 4).
It is assumed that the key is pressed in the state shown in display example 114 (S13, S15: "NO", S21: "YES" of FIG. 4, S61: "NO", S63: "NO", S65: "NO" of FIG. 9). In this case, as shown in the display example 115, the cursor 102 is moved downward by 1 line, and is moved to the left side of the character "D" (S151: "YES", S153: "YES", S155: "YES", S157, S159, S163, S165, S19 of FIG. 4).
As described above, according to the present embodiment, in the text display area 100 of the editing screen of the display 5, a plurality of characters are displayed in a left-right direction from the left end toward the right end of the text display area 100 (S19 in fig. 4). A cursor indicating the cursor position is also displayed in the text display area 100 (S11, S19). When the cursor position is moved, if it is determined that at least a part of the characters adjacent to the cursor position in the left-right direction is located outside the text display area 100, the text 101 is relatively moved by the width (first width or second width) of the characters in the left-right direction with respect to the display range (S18, S23). Thereby, regardless of the width of the character in the left-right direction, the entire character adjacent to the cursor position is displayed in the text display area 100 (S19). The user can easily grasp the character by observing the entire character adjacent to the cursor position.
In the left side checking process (see fig. 6), when the cursor position is moved, it is determined whether or not the cursor position is located at the left end of the text display area 100 (S81). If it is determined that the moved cursor position is located at the left end of the text display area 100 (S81: YES), it is determined whether or not a character exists on the left side of the cursor position (S83). When a character exists on the left side of the cursor position (S83: YES), the text is relatively moved to the right side with respect to the display range by the width (first width or second width) of the character (S87, S89). Thereby, the entire character on the left side of the cursor position is displayed in the text display area 100 (S19).
If the moved cursor position is not located at the left end of the text display area 100 (S81: no), it is determined whether a part of the characters located on the left side of the cursor position is located outside the text display area 100 (S91). If it is determined that a part of the character is located outside the text display area 100 (S91: YES), the text is relatively moved to the right with respect to the display range by the first width amount (S93). Thereby, the entire character on the left side of the cursor position is displayed in the text display area 100 (S19).
In the right side check processing (see fig. 7), when the cursor position is moved, it is determined whether or not the cursor position is located at the right end of the text display area 100 (S111). When it is determined that the moved cursor position is located at the right end of the text display area 100 (S111: YES), it is determined whether or not a character exists on the right side of the cursor position (S113). When a character is present on the right side of the cursor position (S113: YES), the text is moved to the left side relative to the display range by the width (first width or second width) of the character (S117, S119). Thereby, the entire character on the right side of the cursor position is displayed in the text display area 100 (S19).
When the moved cursor position is not located at the right end of the text display area 100 (S111: no), it is determined whether a part of the character located on the right side of the cursor position is located outside the text display area 100 (S121). If it is determined that a part of the character is located outside the text display area 100 (S121: YES), the text is relatively moved to the left with respect to the display range by a first width amount (S123). Thereby, the entire character on the right side of the cursor position is displayed in the text display area 100 (S19).
In this way, the text is moved relative to the display range in accordance with the determination of the cursor position or the position of the character adjacent to the cursor position when the cursor position is moved. This makes it possible to display the entire character adjacent to the cursor position in the text display area 100. The user can easily grasp the character by observing the entire character adjacent to the cursor position.
A plurality of lines of characters can be displayed in the text display area 100. When the up key is operated (S65: "YES" of FIG. 9), the on-cursor movement process (see FIG. 12) is executed (S66). When the down key is operated (S65: "NO" of FIG. 9), the under cursor movement process (see FIG. 13) is executed (S67).
In the on-cursor movement process, it is determined whether or not a line of characters exists on the upper side of the cursor position (S131). When a line of characters exists on the upper side of the cursor position (S131: "YES"), it is judged whether or not the end on the right side of the upper line is located on the right side of the cursor position (S133). When the right end of the upper row is located on the right side of the cursor position (S133: YES), the cursor position is moved upward by 1 row (S137, S141). When the cursor position is moved upward by 1 line, if it is determined that the cursor position overlaps the character (S135), the cursor position is moved to the left side of the character (S139). Thereafter, the left side check processing (S143) and the right side check processing (S145) are executed to cause the entire character adjacent to the cursor position to be displayed in the text display area 100 (S19 of fig. 4).
In the cursor down movement process, it is determined whether or not a line of characters exists below the cursor position (S151). When a line of characters exists below the cursor position (S151: "YES"), it is judged whether or not the end of the right side of the line on the lower side is located on the right side of the cursor position (S153). When the right end of the lower row is located on the right side of the cursor position (S153: YES), the cursor position is moved downward by 1 row (S157, S161). When the cursor position is moved downward by 1 line, if it is determined that the cursor position overlaps the character (S155), the cursor position is moved to the left side of the character (S159). Thereafter, the left side check process (S163) and the right side check process (S165) are executed, and the entire character adjacent to the cursor position is displayed in the text display area 100 (S19 of fig. 4).
In this way, even when an instruction to move the cursor position upward or downward is accepted, the entire character can be displayed in the display area regardless of the width of the character adjacent to the cursor position in the left-right direction. The user can easily grasp the character by observing the entire character adjacent to the cursor position.
Text includes characters such as words, numbers, symbols, foreign language, and the like. The character data indicates a character width and a character height. In the display processing (see fig. 8), it is determined whether or not the ratio of the character height to the character width of the display target character is equal to or greater than a threshold value (S49). Characters having a ratio above the threshold are displayed in the text display area 100 in the first width and at a predetermined height (S49: "YES", S51, S55). Characters having a ratio smaller than the threshold are displayed in the text display area 100 with a second width larger than the first width and a predetermined height (S49: "NO", S53, S55). The CPU401 can determine the width of the displayed character as which of the first width and the second width is according to the ratio of the character height to the character width. It is easier for the user to visually confirm the characters than in the case where the width of the displayed characters is determined uniformly.
The user can confirm the displayed characters by looking at the display 5 provided in the printing apparatus 1. The printing apparatus 1 is capable of printing a text made by inputting characters via character keys on a printing medium.
The present invention is not limited to the above embodiment, and various modifications can be made. The main processing in the above-described embodiment is not limited to the case of being executed by the CPU401 of the printing apparatus 1. For example, the program of the main process may be executed by an editing apparatus having a display unit capable of editing text. In this case, the editing apparatus may not be able to print the text. S25 and S27 in the main process may not be performed. S29 in the main process may not be performed. The editing apparatus may also generate text data of the edited text. The printing apparatus 1 may acquire text data from an editing apparatus and perform printing processing based on the text data.
The character data may also include information indicating which of a half angle and a full angle the character is. In this case, S49, S51, and S53 in the display processing (see fig. 8) may not be executed. In S55, display data may be generated depending on which of the half angle and the full angle the character is, and the character may be displayed in the text display area 100.
Alternatively, 1 line of characters may be displayed in the text display area 100. In this case, S65, S66 (cursor up movement processing), and S67 (cursor down movement processing) in the cursor movement processing (refer to fig. 9) may not be executed.
In the on-cursor movement process (see fig. 12), the left side check process (S143) may be executed after the right side check process (S145). In the cursor down movement process (see fig. 13), the left side check process (S163) may be executed after the right side check process (S165).
In S139 of the on-cursor movement process, the CPU401 may also move the cursor position to the right of the character overlapping with the cursor position. In S159 of the under cursor movement process, the CPU401 may also move the cursor position to the right of the character that overlaps with the cursor position.
Characters may not be represented by character codes. For example, the character may be image data (raster data). The image data of the character may include information indicating the width in the first direction and the height in the second direction of the character.
In S51 of the display process (see fig. 8), the CPU401 may change the ratio of the character height to the character width when generating the display data in which the first width and the predetermined height are set for the display target character. For example, the character may be enlarged/reduced such that the character width coincides with the first width and the character height coincides with the predetermined height. In S53, the CPU401 may change the ratio of the character height to the character width when generating the display data in which the second width and the predetermined height are set for the display target character. For example, the character may be enlarged/reduced such that the character width coincides with the second width and the character height coincides with the predetermined height.
In the above embodiment, the entire characters adjacent to the cursor position are displayed in the text display area 100. In a line without a cursor position, a part of the character is sometimes located outside the text display area 100. However, in the line without the cursor position, the entire character located at the end portion on the side where the cursor position is located in the left-right direction of the text display area 100 may be displayed in the text display area 100.
Specifically, when it is determined that the cursor position is located at the left end or the right end of the text display area 100, the text 101 is moved in the left-right direction as necessary, and the entire character located at the left end or the right end of the text display area 100 may be displayed in the text display area 100 in a row where the cursor is not present. Further, when it is determined that 1 character exists between the cursor position and the left end or the right end of the text display area 100, the text 101 may be moved in the left-right direction as necessary, and the entire character located at the left end or the right end of the text display area 100 may be displayed in the text display area 100 in a row without the cursor position. For example, the CPU401 may execute the processing as follows.
In the scroll processing shown in fig. 5, after the left side check processing (S33) is executed, the CPU401 may determine whether or not a part of the character located at the left end of the text display area 100 is located outside the text display area 100 for the line without the cursor position. When a part of the character is located outside the text display area 100, the CPU401 may move the text to the right with respect to the display range by the first width amount, as in S93 of the left side check process shown in fig. 6. When the entire characters located at the left end of the text display area 100 are located in the text display area 100, the CPU401 may end the scroll processing.
In the scroll processing, the CPU401 may determine whether or not a part of the character located at the right end of the text display area 100 is located outside the text display area 100 for the line without the cursor position after executing the right side check processing (S35). When a part of the character is located outside the text display area 100, the CPU401 may move the text to the left with respect to the display range by the first width amount, as in S123 of the right side check processing shown in fig. 7. When the entire character positioned at the right end of the text display area 100 is positioned in the text display area 100, the CPU401 may end the scroll processing.
In the left cursor movement process shown in fig. 10, after executing the left side check process (S75), the CPU401 may determine whether or not a part of the character located at the left end of the text display area 100 is located outside the text display area 100 for the line without the cursor position. Then, when a part of the character is located outside the text display area 100, the CPU401 may move the text to the right with respect to the display range by the first width amount, as in S93. When the entire character located at the left end of the text display area 100 is located in the text display area 100, the CPU401 may end the cursor left movement process.
In the cursor right movement process shown in fig. 11, after executing the right side check process (S105), the CPU401 may determine whether or not a part of the character located at the right end of the text display area 100 is located outside the text display area 100 for the line without the cursor position. When a part of the character is located outside the text display area 100, the CPU401 may move the text to the left with respect to the display range by the first width amount in the same manner as in S123. When the entire character positioned at the right end of the text display area 100 is positioned in the text display area 100, the CPU401 may end the cursor right movement process.
In the on-cursor movement process shown in fig. 12, as a result of the left-side check process being executed in S143, the moved cursor position may be located at the left end of the text display area 100. In addition, there may be 1 character between the moved cursor position and the left end of the text display area 100. In this case, the CPU401 may execute the same processing as that after the left-side check processing (S75) is executed in the cursor left movement processing for the row without the cursor position.
In the on-cursor movement processing, as a result of the execution of the right-side check processing in S145, the moved cursor position may be located at the right end of the text display area 100. Further, there may be 1 character between the moved cursor position and the right end of the text display area 100. In this case, the CPU401 may execute the same processing as that after the right side check processing (S105) is executed in the cursor right movement processing for the row without the cursor position.
In the cursor downward movement process shown in fig. 13, as a result of the left side check process being executed in S163, the cursor position after being moved may be located at the left end of the text display area 100. In addition, there may be 1 character between the moved cursor position and the left end of the text display area 100. In this case, the CPU401 may execute the same processing as that after the left-side check processing (S75) is executed in the cursor left movement processing for the row without the cursor position.
In the under cursor movement processing, as a result of executing the right side check processing in S165, the cursor position after being moved may be located at the right end of the text display area 100. Further, there may be 1 character between the moved cursor position and the right end of the text display area 100. In this case, the CPU401 may execute the same processing as that after the right side check processing (S105) is executed in the cursor right movement processing for the row without the cursor position.
A display example displayed in the case where the processing is performed in the above-described manner is explained. For example, as shown in fig. 16, in the display example 114 in the above-described embodiment, the characters "B" on the right side of the cursor 102 are displayed in their entirety in the text display area 100. A portion of the character "E" located at the left end of the text display area 100 in the line without the cursor 102 is located outside the text display area 100. However, in such a case, the text 101 may be relatively moved to the left with respect to the display range by the first width amount. Then, as shown in an example 121 of fig. 17, the entire character "E" may be displayed in the text display area 100.
In the above embodiment, the display 5 corresponds to the "display unit" of the present invention. The text display area 100 corresponds to a "display area" of the present invention. The left end of the text display area 100 corresponds to the "first end" of the present invention. The right end of the text display area 100 corresponds to the "second end" of the present invention. The operation unit 2 corresponds to an "input unit" of the present invention. The cursor position corresponds to the "edit position" of the present invention. The cursor 102 corresponds to the "mark" of the present invention. The upper side in the text 101 corresponds to the "first side" of the present invention. The lower side in the text 101 corresponds to the "second side" of the present invention.
In the display processing shown in fig. 8, the CPU401 that displays characters in the text display area 100 is an example of the "first display control unit" of the present invention. The CPU401 that displays the cursor in the text display area 100 in S11 and S19 (display processing) of the main processing shown in fig. 4 is an example of the "second display control unit" of the present invention. The CPU401 that executes the display processing (S19) after executing the scroll processing (S18) and the CPU401 that executes the display processing (S19) after executing the cursor movement processing (S23) are examples of the "third display control unit" of the present invention.
The CPU401 of S65 executing the cursor movement process shown in fig. 9 is an example of the "receiving unit" of the present invention. The CPU401 executing S131 of the on-cursor movement process shown in fig. 12 and S151 of the under-cursor movement process shown in fig. 13 is an example of the "determination unit" of the present invention. The CPU401 executing S137, S141 of the on-cursor movement process shown in fig. 12 and S157, S161 of the under-cursor movement process shown in fig. 13 is an example of the "first movement unit" of the present invention. The CPU401 executing S139 of the on-cursor movement process shown in fig. 12 and S159 of the under-cursor movement process shown in fig. 13 is an example of the "second movement unit" of the present invention. The thermal head 10, the drive circuit 406, and the CPU401 of S27 that executes the main processing are an example of the "printing unit" of the present invention.
In the display processing shown in fig. 8, the processing of displaying characters in the text display area 100 is an example of the "first display step" of the present invention. The process of displaying the cursor in the text display area 100 in S11 and S19 (display process) of the main process is an example of the "second display control step" of the present invention. The processing of executing the display processing (S19) after executing the scroll processing (S18) and the processing of executing the display processing (S19) after executing the cursor movement processing (S23) are examples of the "third display control step" of the present invention.
Description of the reference symbols
1 printing device
2 operating part
5 display
10 thermal head
100 text display area
101 text
102 cursor
200 character
210 character
300 character
310 characters
401 CPU
406 driving circuit
Height of H11 character
Height of H12 character
H21 predetermined height
W11 character width
W12 character width
W21 first width
W22 second width.

Claims (6)

1. An editing apparatus, comprising:
a display unit capable of displaying an image;
a first display control unit that displays a plurality of first characters, which are a plurality of characters represented by a plurality of character data, in a display area of the display unit, from a first end, which is one end in a first direction, of the display area to a second end, which is the other end in the first direction, of the display area, the first character being arranged in the first direction;
a second display control unit that displays, in the display area, a mark indicating an edit position that is a position where a character can be input by an operation on the input unit; and
a third display control unit configured to, when it is determined that at least a part of a second character that is a character adjacent to the moved editing position in the first direction is located outside the display area when the editing position is moved, move the plurality of first characters in the first direction to the display area side by an amount of width in the first direction of the at least a part of the second character, and display the entire second character in the display area,
the plurality of first characters include any one of letters, numerals, signs and foreign language,
the plurality of character data respectively indicate a width in the first direction and a height in a second direction that is a direction orthogonal to the first direction of each of the plurality of characters,
the first display control unit and the third display control unit determine whether or not a ratio of the height to the width of each of the plurality of first characters is equal to or greater than a threshold value,
causing characters of which the ratio is above the threshold to be displayed in the display area with a first width and a predetermined height,
displaying characters having the ratio smaller than the threshold in the display area with a second width larger than the first width and the predetermined height.
2. The editing apparatus according to claim 1,
the third display control means, when determining that the editing position is located at the first end when the editing position is moved, moves the plurality of first characters to the second end side by an amount of width in the first direction of the second character located on the opposite side of the second end with respect to the first end, and displays the entire second character in the display area,
the third display control means, when determining that the editing position is located at the second end when the editing position is moved, moves the plurality of first characters to the first end side by an amount of width in the first direction of the second character located on the opposite side of the first end with respect to the second end, and displays the entire second character in the display area,
the third display control means, when determining that the second character is located at the first end of the display area in the first direction and a part of the second character is located outside the display area when the editing position is moved, moves the plurality of first characters to the second end side by the amount of width in the first direction of the part of the second character to display the entire second character in the display area,
the third display control means moves the plurality of first characters to the first end side by the amount of width in the first direction of the part of the second character and displays the entire second character in the display area when it is determined that the second character is located at the second end in the first direction of the display area and the part of the second character is located outside the display area when the editing position is moved.
3. The editing apparatus according to claim 2,
the first display control unit arranges the plurality of first characters in the first direction from the first end in the first direction in the display area and displays in a plurality of rows in the second direction,
the editing apparatus further includes:
a reception unit configured to receive an instruction to move the edit position to either a first side in the second direction or a second side opposite to the first side;
a determination unit configured to determine whether one of the plurality of lines is present on one of the first side and the second side in the second direction of the edit position, the one of the plurality of lines being instructed to move by the instruction, when the instruction is accepted by the acceptance unit;
a first moving unit that moves the edit position to one of the first end side and the second end side in the second direction, the one of the first side and the second side being determined by the determining unit to be one of the edit positions in the second direction, the one of the first side and the second side being one of the sides to which movement is instructed by the instruction, and when an end portion of the one of the lines on the second end side in the first direction is located closer to the second end side than the edit position in the first direction; and
a second moving unit that moves the edit position in the first direction to either one of the first end side and the second end side of the character in the line when it is determined that the edit position overlaps the character in the line when the edit position is moved by the first moving unit,
and when the third display control unit determines that at least a part of the second character is located outside the display area when the editing position is moved, the third display control unit moves the plurality of first characters so that the entire second character is displayed in the display area.
4. The editing apparatus according to claim 1,
the first display control unit arranges the plurality of first characters in the first direction from the first end in the first direction in the display area and displays in a plurality of rows in the second direction,
the editing apparatus further includes:
a reception unit configured to receive an instruction to move the edit position to either a first side in the second direction or a second side opposite to the first side;
a determination unit configured to determine whether one of the plurality of lines is present on one of the first side and the second side in the second direction of the edit position, the one of the plurality of lines being instructed to move by the instruction, when the instruction is accepted by the acceptance unit;
a first moving unit that moves the edit position to one of the first end side and the second end side in the second direction, the one of the first side and the second side being determined by the determining unit to be one of the edit positions in the second direction, the one of the first side and the second side being one of the sides to which movement is instructed by the instruction, and when an end portion of the one of the lines on the second end side in the first direction is located closer to the second end side than the edit position in the first direction; and
a second moving unit that moves the edit position in the first direction to either one of the first end side and the second end side of the character in the line when it is determined that the edit position overlaps the character in the line when the edit position is moved by the first moving unit,
and when the third display control unit determines that at least a part of the second character is located outside the display area when the editing position is moved, the third display control unit moves the plurality of first characters so that the entire second character is displayed in the display area.
5. A printing apparatus, comprising:
the editing apparatus of any one of claims 1 to 4; and
a printing unit that prints the plurality of first characters to a printing medium.
6. A control method for an editing apparatus having a display unit capable of displaying an image, comprising:
a first display control step of displaying a plurality of first characters, which are a plurality of characters represented by a plurality of character data, in a display area of the display unit, from a first end, which is one end in a first direction, of the display area to a second end, which is the other end in the first direction, of the display area, in a line in the first direction;
a second display control step of displaying, in the display area, a mark indicating an edit position which is a position where a character can be input by an operation on the input unit; and
a third display control step of, when it is determined that at least a part of a second character that is a character adjacent to the moved editing position in the first direction is located outside the display area when the editing position is moved, moving the plurality of first characters in the first direction to the display area side by an amount of width in the first direction of the at least a part of the second character to display the entire second character in the display area,
the plurality of first characters include any one of letters, numerals, signs and foreign language,
the plurality of character data respectively indicate a width in the first direction and a height in a second direction that is a direction orthogonal to the first direction of each of the plurality of characters,
the first display control unit and the third display control unit determine whether or not a ratio of the height to the width of each of the plurality of first characters is equal to or greater than a threshold value,
causing characters of which the ratio is above the threshold to be displayed in the display area with a first width and a predetermined height,
displaying characters having the ratio smaller than the threshold in the display area with a second width larger than the first width and the predetermined height.
CN201610862367.3A 2015-09-30 2016-09-28 Editing apparatus, printing apparatus, control method, and storage medium Active CN107025895B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015-194645 2015-09-30
JP2015194645A JP6528632B2 (en) 2015-09-30 2015-09-30 Editing device, printing device, and control program

Publications (2)

Publication Number Publication Date
CN107025895A CN107025895A (en) 2017-08-08
CN107025895B true CN107025895B (en) 2021-06-08

Family

ID=58492643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610862367.3A Active CN107025895B (en) 2015-09-30 2016-09-28 Editing apparatus, printing apparatus, control method, and storage medium

Country Status (2)

Country Link
JP (1) JP6528632B2 (en)
CN (1) CN107025895B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10444688B2 (en) * 2018-01-31 2019-10-15 Brother Kogyo Kabushiki Kaisha Editing apparatus, non-transitory storage medium, and printing apparatus
CN215649210U (en) 2021-05-24 2022-01-28 深圳市舜宝科技有限公司 Aerosol-generating article

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0740182B2 (en) * 1987-11-11 1995-05-01 キヤノン株式会社 Document processing apparatus and method
JPH0244398A (en) * 1988-08-05 1990-02-14 Nec Corp Oblique scroll realizing system in interactive text editor
JPH07200557A (en) * 1993-12-27 1995-08-04 Brother Ind Ltd Document processing device
CN1321941A (en) * 2000-05-03 2001-11-14 苏荣斌 Digitalization operation coding processing system of Chinese and foreign language information
US20020178189A1 (en) * 2001-04-23 2002-11-28 Hiroyasu Kurashina Text control method and apparatus
JP2010282408A (en) * 2009-06-04 2010-12-16 Sony Corp Control device, input device, control system, hand-held device, and control method
JP5409896B2 (en) * 2010-03-23 2014-02-05 シャープ株式会社 Information display device and document data editing method
JP2013175162A (en) * 2012-12-10 2013-09-05 Shogo Tsuchida Beautiful word and japanese

Also Published As

Publication number Publication date
JP6528632B2 (en) 2019-06-12
JP2017068664A (en) 2017-04-06
CN107025895A (en) 2017-08-08

Similar Documents

Publication Publication Date Title
JP5834544B2 (en) Program, print data generation apparatus, control method for print data generation apparatus, and printing system
CN107025895B (en) Editing apparatus, printing apparatus, control method, and storage medium
EP1840800A2 (en) Label-printing apparatus and label-printing program recorded on a computer readable recording medium
JP2003085163A (en) Character string editing device and character string editing program
JP5963056B2 (en) Operation input processing program and operation input processing method
EP1512542B1 (en) Tape printing apparatus
US8947715B2 (en) Printer for displaying characters, block numbers and block break line
JP6264277B2 (en) Data processing apparatus, printing apparatus, and data processing program
JP6308088B2 (en) Printing device
JP2012228840A (en) Tape printing apparatus, and display method in the tape printing apparatus
JP6536231B2 (en) Label producing apparatus, label producing method, and label producing program
JP6376147B2 (en) Printing apparatus and control program
JP6870349B2 (en) Printing equipment
JP2008083293A (en) Word card, word card editing device, and word card preparing device
US8339652B2 (en) Label creating apparatus, method for controlling label creating apparatus and computer program
JP6245067B2 (en) Editing device and printing device
CN114987067B (en) Printing control device, printing control method, and recording medium
JP5652640B2 (en) Printing device and program
JP2009012360A (en) Label production apparatus and tag production apparatus
US11167566B2 (en) Device and method of apparatus handling description by the device
JP6447559B2 (en) Printing apparatus, printing method, and printing program
JP6175872B2 (en) Printing apparatus and content editing program
JP6950472B2 (en) Printing equipment and programs
JP2017052190A (en) Printer, control method and control program
JP2014205251A (en) Data preparation device and data preparation program

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
GR01 Patent grant
GR01 Patent grant