Summary of the invention
The objective of the invention is to solve the existing problem of above-mentioned prior art, a kind of reception character font data and display font method and device/transmission character font data method and device is provided, it can reduce cost, the capacity of device; Simultaneously applicable to various fonts or various language environment.
The method of reception character font data of the present invention and display font adopts following technical scheme: receive the method for character font data and display font, comprising:
A, character font data receiving step, data sink receive and send the font coded data packet that data set sends;
B word for word judges the font coding step, word for word has or not the coded message of this word font in the judgment data receiving system;
Have, carry out B11, extract the font coding step, extract the font coded message and be sent to display module; Carry out the C step then;
Do not have, carry out B21, notice sends the font information step, and data sink sends instruction notification transmission data set and sends out the font information packet; B22 receives the font information step, and data sink receives the font information packet; B23 handles the font step, calculates the display message of font and this result of calculation is sent to display module according to the font information packet; Carry out the C step then;
C, the video data step, data sink is display font on the display screen of display module.
Carry out transfer of data by blue-tooth technology between described data sink and the transmission data set.
Also comprise before the A step:
A1, link butt joint step is used to make data sink and transmission data set to be in mated condition;
A2, preliminary step is used to make data sink to be in and prepares to receive font coded data packet state;
Also comprise after the C step:
D judges end step, judges whether all fonts are finished according to step B judgement: be, carry out D1, finish whole process step, finish whole flow process;
Do not have, execution in step B word for word judges the font coding step.
Described data sink is a bluetooth earphone, and it receives and sends font coded data packet and the voice data bag that data set sends;
Described font coded data packet comprises: stem, its expression font coded data packet essential information; N data volume, its according to data type deposit in the address list module corresponding calling number or and the coded message of caller name;
Also comprise between A step and the B step:
A3 judges character font data type step, judges that according to the stem of font coded data packet the character font data type is calling number, caller name or calling number and caller name;
Be calling number, carry out A31, judge digital step display, judge whether the display module in the bluetooth earphone supports numeral to show;
Be, judge the dialing number information step, judge to have or not dialing number information;
Have, extract the calling number step, according to the number mark symbol extraction dialing number information of font coded data packet; Carry out B then, word for word judge the font coding step;
Do not have, carry out D1, finish whole process step;
Not, carry out D1, finish whole process step;
Be caller name or calling number and caller name, carry out A32, judge the literal step display, judge whether the display module in the bluetooth earphone supports font to show;
Be, extract caller name information step, extract the caller name Word message, carry out B then, word for word judge the font coding step according to the number mark symbol that has or not of font coded data packet; Not, carry out A31, judge digital step display.
Described data sink is a bluetooth earphone, and it receives and sends font coded data packet and the voice data bag that data set sends;
Described font coded data packet comprises: stem, its expression font coded data packet essential information; N data volume, it deposits the coded message of the corresponding song title in the song record module according to data type;
Also comprise between A step and the B step: carry out A32, judge the literal step display, judge whether the display module in the bluetooth earphone supports font to show;
Be, extract song title information step, sing according to the number mark symbol extraction that has or not of font coded data packet
Bent name Word message is carried out B then, word for word judges the font coding step;
Not, carry out D1, finish whole process step.
Also comprise: E, judge knob information step, judge to have or not the user to send knob information by knob;
Have, insert E1, judge the knob content step, judge that whether this knob information content is for entering commands steps;
Be, for entering commands steps, bluetooth earphone sends instruction notification and sends data set entry communication record module, and execution in step A, the character font data receiving step receive to send data set and sends out article one log in the address list with the form of font coded data packet; Then, wait for the button information that receives once more; After receiving button information, judge the knob content step once more, judge that this knob information content is the step that exits command, the previous command step or Next Command step;
Be the step that exits command, bluetooth earphone sends instruction notification transmission data set and withdraws from the address list module status;
Be the previous command step, bluetooth earphone sends instruction notification and sends data set, execution in step A, and the character font data receiving step sends out the last log of this log with the form of font coded data packet;
Be the Next Command step, bluetooth earphone sends instruction notification and sends data set, execution in step A, and the character font data receiving step sends out next bar log of this log with the form of font coded data packet;
, bluetooth earphone is not carried out according to the step of former flow process;
Do not have, bluetooth earphone is carried out according to the step of former flow process.
Transmission character font data method of the present invention adopts following technical scheme:
A, the character font data forwarding step sends data set and sends the font coded data packet;
B judges and to receive the instruction notification step, judges whether to receive that request that data sink sends sends the instruction notification of font information packet;
Be, carry out b1, font information packet forwarding step sends data set sends this word according to the instruction notification that receives font information packet;
Do not have, carry out b2, be in waiting step, send data set and be in wait state.
Described transmission data set is a bluetooth cellular phone, and described data sink is a bluetooth earphone, carries out transfer of data by blue-tooth technology between bluetooth cellular phone and the bluetooth earphone;
Also comprise before the step a:
A1 judges to receive the communication instruction step, judges whether bluetooth cellular phone receives the communication communication instruction;
Be to carry out a, the character font data forwarding step;
Not, carry out b2, be in waiting step.
Described transmission data set is bluetooth MP3, and described data sink is a bluetooth earphone, carries out transfer of data by blue-tooth technology between bluetooth MP3 and the bluetooth earphone;
Also comprise before the step a:
A1 judges to receive knob instruction step, judges whether bluetooth MP3 receives the knob play instruction;
Be to carry out a, the character font data forwarding step;
Not, carry out b2, be in waiting step.
Also comprise before a step:
A2, link butt joint step is used to make transmission data set and bluetooth earphone to be in mated condition;
A3, preliminary step is used to make the transmission data set to be in the font coded data packet state that is ready for sending.
C judges knob information step, judges that sending data set has or not the knob information that bluetooth earphone sends that receives;
Have, insert c1, judge the knob content step, judge that whether this knob information content is for entering commands steps;
Be,, send data set entry communication record module for entering commands steps, and execution in step a, the character font data forwarding step is with article one log of form in bluetooth earphone sends out address list of font coded data packet; Then, wait for the button information that receives once more; After receiving button information, judge the knob content step once more, judge that this knob information content is the step that exits command, the previous command step or Next Command step;
Be the step that exits command, send data set and withdraw from the address list module status;
Be the previous command step, send data set, execution in step a, the character font data forwarding step sends out the last log of this log to bluetooth earphone with the form of font coded data packet;
Be the Next Command step, send data set, execution in step a, the character font data forwarding step sends out next bar log of this log to bluetooth earphone with the form of font coded data packet;
, not sending data set carries out according to the step of former flow process;
Do not have, send data set and carry out according to the step of former flow process.
The data sorting of described font coded data packet is:
Stem, its ordering is: version number, the version number of its expression font coded data packet; Data type, it represents the type of this character font data; Type of coding, it represents the type of coding of this character font data; Data length, it represents the data length of this N data volume, represents the starting and ending position of data volume content with this;
N data volume, its according to data type deposit in the address list module corresponding calling number or and the coded message of caller name, wherein calling number has beginning identifier and end identifier, separates with this and the caller name information area;
The data sorting of described font information packet is:
Stem, its ordering is: version number, the version number of its expression font information packet; Type of coding, it represents the type of coding of these font information data; Coded message, it deposits the respective coding data according to type of coding; Data length, it represents the data length of this data volume, represents the starting and ending position of data volume content with this;
Data content, it comprises this font dot matrix, this font dot matrix height and this font dot matrix width.
Reception character font data of the present invention and display font device adopt following technical scheme: receive character font data and display font device, comprise bluetooth communication module, extraction font coding module, font processing module, display module and judge the font coding module;
Bluetooth communication module, in have controller and transport module, controller is used for the processing of each module in the control device, transport module is used for receiving or sending data, transport module comprises:
Receive character font data bag module, it is used to receive the font coded data packet that does not contain the font information data that the transmission data set sends out;
Send request module, it is used to send instruction notification transmission data set and sends out the font information packet;
Receive the font information module, it is used to receive the font information packet that the transmission data set sends out;
Judge the font coding module, the font coded data packet that receives according to bluetooth communication module judges that word for word each word in this font coded data packet has or not the coded message of this word font in data sink, and this module can be selected following action:
Having then, notice extraction font coding module extracts the font coded message;
Nothing is then notified bluetooth communication module to send instruction notification transmission data set and is sent out the font information packet;
Extract the font coding module, the font coded message that is used to extract in the data sink produces corresponding font display message and is sent to display module;
The font processing module, the font information packet that receives according to bluetooth communication module calculates the display message of font and this result of calculation is sent to display module;
It passes through the LCD display display font display module.
Described device is a bluetooth earphone, and it also comprises voice module; Voice module comprises microphone and loud speaker, and microphone is connected in controller by vocoder, and loud speaker is connected in controller by the audio frequency output unit.
Also comprise and judge the knob module; Judge the knob module, judge to have or not the user to send knob information that this module can be selected following action by the knob of bluetooth earphone:
Insertion enters order, sends instruction notification and sends data set entry communication record module, and execution in step A, and the character font data receiving step sends out article one log in the address list with the form of font coded data packet;
Or insertion exits command, and sends instruction notification transmission data set and withdraws from the address list module status;
Or, insert the previous command, send instruction notification and send data set, execution in step A, the character font data receiving step sends out the last log of this log with the form of font coded data packet;
Or, insert Next Command, send instruction notification and send data set, execution in step A, the character font data receiving step sends out next bar log of this log with the form of font coded data packet;
Or the notice bluetooth earphone is carried out according to the step of former flow process.
Also comprise and judge the character font data type block; Judge the character font data type block, judge that according to the stem of the font coded data packet that receives the character font data type is calling number, caller name or calling number and caller name, this module can be selected following action:
Judge whether the display module in the bluetooth earphone supports digital the demonstration, judges to have or not dialing number information, extracts dialing number information according to the number mark symbol, and dialing number information is sent to judgement font coding module;
Or, judge whether the display module in the bluetooth earphone supports font to show, extract the caller name Word message according to having or not number mark to accord with, and caller name information is sent to judgement font coding module.
Transmission data set of the present invention adopts following technical scheme: send data set, comprise that bluetooth communication module, controller, memory module, address list module and judgement receive the instruction notification module;
Bluetooth communication module, in have transport module, transport module is used for receiving or sends data, transport module comprises: send character font data bag module, it is used for extracting in the address list module and does not contain the font coded data packet of font information, and sends this font coded data packet;
Receive request module, it is used to receive the instruction notification that data sink sends out;
Send the font information module, it is used for sending the font information packet according to instruction notification;
Controller is used for the processing of each module in the control device;
Memory module is used to store the data of the font information of each word;
The address list module is used for the data of store font;
Judge and to receive the instruction notification module that be used to judge whether to receive that request that data sink sends sends the instruction notification of font information packet, this module can be selected following action:
Notice sends the font information module and extracts font information packet transmission font information packet according to instruction notification in memory module;
Or notice sends data set and is in wait state.
Described address list module memory stores up each bar address list, and each bar address list comprises calling number and caller name.If this device is a bluetooth cellular phone, then deposit calling number and caller name in; If this device is bluetooth MP3, then song title is saved as caller name.
Described device is a bluetooth cellular phone, and the address list module memory stores up each bar address list, and each bar address list comprises calling number and caller name;
Bluetooth cellular phone also comprises and receives communication communication instruction module; Receive communication communication instruction module and receive the communication communication instruction, and preparation sends the font coded data packet.
Described device is bluetooth MP3, and the address list module memory stores up each bar address list, and each bar address list comprises song title;
Bluetooth MP3 also comprises: the knob module, it is used to send the knob play instruction, and preparation sends the font coded data packet.
Also comprise and judge the knob information module, it judges that sending data set has or not the knob information that bluetooth earphone sends that receives, and this module can be selected following action:
Insertion enters order, sends data set entry communication record module, and execution in step a, and character font data is sent out
Send step, with article one log of form in bluetooth earphone sends out address list of font coded data packet;
Or insertion exits command, and sends data set and withdraws from the address list module status;
Or, insert the previous command, send data set, execution in step a, the character font data forwarding step sends out the last log of this log to bluetooth earphone with the form of font coded data packet;
Or, insert Next Command, send data set, execution in step a, the character font data forwarding step sends out next bar log of this log to bluetooth earphone with the form of font coded data packet;
Or notice sends data set and carries out according to the step of former flow process.
By the above-mentioned description of this invention as can be known, compare with background technology, the present invention has following advantage:
Adopted in reception character font data that method of the present invention designs and the display font device and need not to set in advance character library, this has saved the cost that receives character font data and display font device; Functional module in character font data and the display font device is few, and capacity is little; The reception character font data and the display font device that have adopted method of the present invention to design match with supporting the different fonts or the transmission data set of different language environment, then can demonstrate different fonts or different language environment.
Embodiment
The present invention is further illustrated below in conjunction with accompanying drawing.
The reception character font data of present embodiment and the device of display font are bluetooth earphone, and sending data set is bluetooth cellular phone or bluetooth MP3.Carry out transfer of data by blue-tooth technology between bluetooth earphone and bluetooth cellular phone or the bluetooth MP3.Data comprise font coded data packet and voice data bag.The bluetooth earphone of present embodiment does not possess character library, realizes the transmission of character font data bag and the function that font shows by the font information in the character library of request outside bluetooth cellular phone of transmission or bluetooth MP3, thereby has reduced the cost and the capacity of bluetooth earphone.But the method for present embodiment and device also can support to possess the bluetooth earphone of character library.
The font transmission of present embodiment is followed bluetooth communication agreement and the self-defining font host-host protocol of the present invention with Display Technique.
The font host-host protocol: a self-defined agreement about the font transmission in the present embodiment mainly is that data format, the data format of command packet and the data format of font information packet of the font coded data packet of font transmission are made stipulations.This agreement is applicable to various fonts, various language environments.
As shown in Figure 1, the data sorting of the data format of font coded data packet is: a stem and N data volume.The data sorting of the data format of stem is: version number, data type, type of coding and data length.Version number represents the version number of font coded data packet.Version number accounts for 1 byte (8) altogether: wherein 4 major version number are represented model change, and 4 precedence version numbers represent to revise the release.Value is represented with binary-coded decimal, from 0.0~9.9.The font data format front page, version number is 1.0, wherein 1 represents major version number, 0 expression time version number.Data type and type of coding account for 1 byte (8) altogether.As shown in Figure 2, the type of this character font data of data types to express.Data type is occupied 4: value hexadecimal representation, 0h~Fh.The character font data type is a calling number; Or, caller name; Or, calling number and caller name; Or it is standby.As shown in Figure 3, type of coding is represented the type of coding of this character font data.Type of coding occupies 4 altogether: value hexadecimal representation, 0h~Fh.Type of coding is binary-coded decimal, ASCII character, the UNICODE sign indicating number and standby of binary-coded decimal, compression.Data length, it represents the data length of this N data volume, represents the starting and ending position of data volume content with this.Data length accounts for 2 bytes altogether: being meant N data volume length altogether, is unit with the byte.Can know the starting and ending position of data content with this, because long 16 bits of this field, so the longest 65535 bytes that reach of data.N data volume, its according to data type deposit in the address list module corresponding calling number or and the coded message of caller name, wherein calling number has beginning identifier and end identifier, separates with this and the caller name information area.Data (N byte): deposit the coded message of corresponding calling number or caller name according to data type, wherein calling number has beginning identifier and end identifier, separates with this and other informations area such as caller name.Number begins identifier and number end identifier all with " 1; " expression, an identifier accounts for 2 bytes, for example: 1; 13,338,888,888 1; If the multiple of the byte number N less than 4 that data are shared is then supplied the multiple that is 4 bytes with 0 in the back.
As shown in Figure 4, the data sorting of the data format of command packet is: version number, order, data length and data volume.Version number represents the version number of command packet.Version number accounts for 1 byte (8) altogether: wherein 4 major version number are represented model change, and 4 precedence version numbers represent to revise the release.Value is represented with binary-coded decimal, from 0.0~9.9.Order data form front page, version number is 1.0, wherein 1 represents major version number, 0 expression time version number.As shown in Figure 5, order accounts for 1 byte (8) altogether: value hexadecimal representation, 00h~FFh.Order is that do-nothing instruction, request send font information, ask the transmission address list, ask to send one, the request transmission address list next one and standby on the address list.Data length, it represents the data length of this data volume, represents the starting and ending position of data volume content with this.Data length occupies 1 byte altogether: being meant the length of data volume, is unit with the byte.Can know the starting and ending position of data content with this, because long 8 bits of this field, so the longest 256 bytes that reach of data.As shown in Figure 6, data account for the N byte: the content according to order is deposited corresponding data (parameter value).If command type sends address list for request, then data have two parameter values: enter and withdraw from, each parameter accounts for 1 byte, uses hexadecimal representation: " entering " represented with hexadecimal 01h; " withdraw from " with hexadecimal 00h and represent, all the other 02h~FFh are standby; Send one, the request transmission address list next one and standby on the address list if command type is do-nothing instruction, request, then data do not have parameter value; If command type sends font information, the then type of coding of this font of deposit data and coded message for request.The 3rd row of form among the just Fig. 6 that deposits in " data volume " among Fig. 6, data (parameter value) just, first row are corresponding " order implications ", secondary series is corresponding " data length value ".These data are deposited content corresponding according to command type.Type of coding is represented the type of coding of this character font data, with reference to Fig. 3.Type of coding occupies 1 byte altogether: value hexadecimal representation, 00h~FFh.Type of coding is binary-coded decimal, ASCII character, the UNICODE sign indicating number and standby of binary-coded decimal, compression.Coded message is occupied 2 bytes altogether: deposit the respective coding data according to type of coding.Type of coding and coded message are deposited in the data volume.
As shown in Figure 7, the data sorting of the data format of font information packet is: stem and data content.The data sorting of the data format of stem is: version number, type of coding, coded message and data length.Version number represents the version number of font information packet.Version number accounts for 1 byte (8) altogether: wherein 4 major version number are represented model change, and 4 precedence version numbers represent to revise the release.Value is represented with binary-coded decimal, from 0.0~9.9.Font information form front page, version number is 1.0, wherein 1 represents major version number, 0 expression time version number.Type of coding is represented the type of coding of this character font data, with reference to Fig. 3.Type of coding occupies 1 byte altogether: value hexadecimal representation, 00h~FFh.Type of coding is binary-coded decimal, ASCII character, the UNICODE sign indicating number and standby of binary-coded decimal, compression.Coded message accounts for 2 bytes altogether: deposit the respective coding data according to type of coding.Data length, it represents the data length of this data volume, represents the starting and ending position of data volume content with this.Data length accounts for 2 bytes altogether: being meant the length of data volume, is unit with the byte.Can know the starting and ending position of data content with this, because long 16 bits of this field, so the longest 65535 bytes that reach of data.Data content comprises the width of font information, the height of font information and the lattice information of font information.The width of font information accounts for 1 byte: the font transverse width is counted, and a bit is 1 bit.Bitwise, so long 8 bits of this field are the wideest 256 bits that reach of set width.The height of font information accounts for 1 byte: font is vertically highly counted, and a bit is 1 bit.Bitwise, long 8 bits of this field are so font height reaches as high as 256 bits.The lattice information of font information (N byte): the dot matrix data of font.Total n * m point in the dot matrix, each point can be stain or white point, stain is formed the stroke of font, depicts font.With the dot matrix of a word of one group of binary number representation, with 1 stain of representing in the dot matrix, all the other are represented with 0.N * m dot matrix word accounts for the (byte of n * m)/8.If the multiple of the byte number N less than 4 that this dot matrix is shared is then supplied the multiple that is 4 bytes in the dot matrix back with 0.
Receive the method for character font data and display font, shown in Fig. 8,9,10, comprising:
A1, link butt joint step is used to make data sink and transmission data set to be in mated condition; In the present embodiment be, bluetooth earphone A and bluetooth cellular phone B successful matching, set up link, earphone is in wait state;
A2, preliminary step as shown in Figure 9, is used to make data sink to be in and prepares to receive font coded data packet step; It comprises:
Received communication instruction step, data sink receive and send the communication instruction that data set sends; Be that when bluetooth cellular phone receives voice call request, when bluetooth earphone sent communication instruction, bluetooth earphone received the communication instruction that bluetooth earphone sends in the present embodiment;
Send the response instruction step, data sink sends response instruction; In the present embodiment be, bluetooth earphone responds, and sends response instruction to bluetooth cellular phone; The mobile phone judgement has or not response, if response is arranged, then is, and makes bluetooth earphone be in the state that receives data;
A, character font data receiving step, data sink receive and send the font coded data packet that data set sends;
A4, the font coded data packet unpacks step, is used for the font coded data packet is unpacked;
A5 reads font coded data packet header message step, is used to read font coded data packet header message;
A3 judges character font data type step, judges that according to the stem of font coded data packet the character font data type is calling number, caller name or calling number and caller name;
Be calling number, carry out A31, judge digital step display, judge whether the display module in the bluetooth earphone supports numeral to show;
Be, judge the dialing number information step, judge to have or not dialing number information;
Have, extract the calling number step, according to the number mark symbol extraction dialing number information of font coded data packet; Carry out B then, word for word judge the font coding step;
Do not have, carry out D1, finish whole process step;
Not, carry out D1, finish whole process step;
Be caller name and calling number and caller name, carry out A32, judge the literal step display, judge whether the display module in the bluetooth earphone supports font to show;
Be, extract caller name information step, extract the caller name Word message, carry out B then, word for word judge the font coding step according to the number mark symbol that has or not of font coded data packet;
Not, carry out A31, judge digital step display;
B word for word judges the font coding step, word for word judges the coded message that has or not this word font in the bluetooth earphone;
Have, carry out B11, extract the font coding step, extract the font coded message and be sent to display module; Then carry out B111, test set width step, test font width W
n, carry out the C step then;
Do not have, carry out B31, judge to send the font information step, judge to have or not to send out the instruction notification that the request bluetooth cellular phone sends the font information packet; Described instruction notification is command packet;
Have, then carry out B21, notice sends the font information step, and as shown in figure 10, this step comprises:
Send request step, bluetooth earphone sends instruction notification transmission data set and sends out the font information packet;
The wait-for-response step, bluetooth earphone sends response signal, up to receiving the response instruction that bluetooth cellular phone sends it back;
Check the Link State step, it checks Link State, carries out B22 then, receives the font information step;
Do not have, then carry out D1, finish whole process step;
B22 receives the font information step, and data sink receives the font information packet, has in the font information packet in character library and calls the font lattice information;
B24, the font information packet unpacks step, is used for the font information packet is unpacked;
B23 handles the font step, calculates the display message of font and this result of calculation is sent to display module according to the font information packet; Carry out the C step then;
C, the video data step, data sink is display font on the display screen of display module; Drive IC drives LCD display, and font is shown on LCD display;
D judges end step, judges whether all fonts are finished according to step B judgement:
Be, carry out D1, finish whole process step, finish whole flow process;
Do not have, execution in step B word for word judges the font coding step.
Timing execution in step in the step of whole former flow process is carried out: also comprise: E judges knob information step, judges to have or not the user to send knob information by knob;
Have, insert E1, judge the knob content step, judge that whether this knob information content is for entering commands steps;
Be, for entering commands steps, bluetooth earphone sends instruction notification and sends data set entry communication record module, and execution in step A, the character font data receiving step receive to send data set and sends out article one log in the address list with the form of font coded data packet; Then, wait for the button information that receives once more; After receiving button information, judge the knob content step once more, judge that this knob information content is the step that exits command, the previous command step or Next Command step;
Be the step that exits command, bluetooth earphone sends instruction notification transmission data set and withdraws from the address list module status;
Be the previous command step, bluetooth earphone sends instruction notification and sends data set, execution in step A, and the character font data receiving step sends out the last log of this log with the form of font coded data packet;
Be the Next Command step, bluetooth earphone sends instruction notification and sends data set, execution in step A, and the character font data receiving step sends out next bar log of this log with the form of font coded data packet;
, bluetooth earphone is not carried out according to the step of former flow process;
Do not have, bluetooth earphone is carried out according to the step of former flow process.
B23, handle the font step, it comprises: calculate the display message step, calculate the present position of font according to the width of font dot matrix height, font dot matrix width, preceding each font and the line space set, present position and font dot matrix are formed display message; Transmit the display message step, display message is sent to display module, and on LCD display, shows, so far this font end of output.
Suppose that in advance this font is a n font to display; According to the parameter in the font information data: the lattice information that can draw this font is known: the width W of font information
n, font information height H
n
Calculate the display message step, comprising:
Be used to suppose the hypothesis display screen size step of this LCD display size for N * M;
Be used to define font output coordinate X, the coordinate definition step of Y;
Be used to give initial value X=0, Y=0 gives the initial value step;
The line space that is used for Set Font line space Wa is set step;
Be used to read the width W of font lattice information, font information
n, font information height H
nAnd the set width W that reads preceding n font
N-1, W
N-2..., W
N-n-1Read step;
Be used for determining the summit determining step of font vertex position, and position, the font upper left corner (X, Y), X=(n-1) * Wa+W wherein
N-1+ W
N-2+ ... + W
N-n-1, Y=(M-H
n)/2 are starting point with this position, read the font lattice information: from the upper left corner of font dot matrix, from left to right, expression line by line from top to bottom then.
As shown in figure 11, on the LCD display, the position that each font shows all is to realize align center according to the height of itself and the height of display screen; Width and line space according to preceding several fonts are realized left-justify.For example: first font " greatly " is first font to display, and its height is H
1, width is W
1, then its position, the upper left corner be (X, Y) promptly: (0, (M-H
1)/2).Second font " one " highly is H
2, width is W
2, then its position, the upper left corner is ((1 * Wa+W
0), (M-H
1)/2).By that analogy, position, the 3rd the font upper left corner then is: ((2 * Wa+W
0+ W
1), (M-H
2)/2) ...,, wait for next communication until whole font end of outputs.
Transmission character font data method of the present invention adopts following technical scheme: as shown in figure 12, send the character font data method and comprise:
A2, link butt joint step is used to make transmission data set and bluetooth earphone to be in mated condition; In the present embodiment be, earphone and mobile phone successful matching, set up link, earphone is in wait state;
A1 judges to receive the communication instruction step, judges whether bluetooth cellular phone receives the communication communication instruction;
Be to carry out a3, preliminary step;
Not, carry out b2, be in waiting step;
A3, preliminary step is used to make the transmission data set to be in and is ready for sending font coded data packet step; It comprises:
Send the communication instruction step, send the communication instruction that data set sends out; In the present embodiment be, when bluetooth cellular phone receives voice call request, when bluetooth earphone sends communication instruction;
Receive the response instruction step, send data set and receive response instruction; In the present embodiment be, when bluetooth earphone responds, and when sending response instruction to bluetooth cellular phone; The bluetooth cellular phone judgement has or not response, if response is arranged, then is, and makes bluetooth cellular phone be in the state that sends data;
A, the character font data forwarding step sends data set and sends the font coded data packet;
B judges and to receive the instruction notification step, judges whether to receive that request that data sink sends sends the instruction notification of font information packet;
Be, carry out b1, font information packet forwarding step sends data set sends this word according to the instruction notification that receives font information packet;
Do not have, carry out b2, be in waiting step, send data set and be in wait state.
Font information packet forwarding step comprises: the extraction dot matrix step that is used to extract the lattice information of this word in the character library; Be used for by sending the forwarding step that the font information packet sends this word lattice information.
Timing execution in step: c in the step of whole former flow process is carried out judges knob information step, judges that sending data set has or not the knob information that bluetooth earphone sends that receives;
Have, insert c1, judge the knob content step, judge that whether this knob information content is for entering commands steps;
Be,, send data set entry communication record module for entering commands steps, and execution in step a, the character font data forwarding step is with article one log of form in bluetooth earphone sends out address list of font coded data packet; Then, wait for the button information that receives once more; After receiving button information, judge the knob content step once more, judge that this knob information content is the step that exits command, the previous command step or Next Command step;
Be the step that exits command, send data set and withdraw from the address list module status;
Be the previous command step, send data set, execution in step a, the character font data forwarding step sends out the last log of this log to bluetooth earphone with the form of font coded data packet;
Be the Next Command step, send data set, execution in step a, the character font data forwarding step sends out next bar log of this log to bluetooth earphone with the form of font coded data packet;
, not sending data set carries out according to the step of former flow process;
Do not have, send data set and carry out according to the step of former flow process.
Receive character font data and display font device, as shown in figure 13, comprise bluetooth communication module 1, extraction font coding module 2, font processing module 3, display module 4, judge font coding module 5 and voice module 6;
Bluetooth communication module 1, in have controller, transport module, link butt joint unit and preparation unit, controller is used for the workflow of each module in the control device and to the processing of each module, link butt joint unit is used to make bluetooth earphone and transmission character font data device to be in mated condition, preparation unit is used to make bluetooth earphone to be in preparation reception font coded data packet state, transport module is used for receiving or sending data, and transport module comprises:
Receive character font data bag module 11, it is used to receive the font coded data packet that does not contain the font information data that the transmission data set sends out;
Send request module 12, it is used to send instruction notification transmission data set and sends out the font information packet;
Receive font information module 13, it is used to receive the font information packet that the transmission data set sends out;
Judge font coding module 5, the font coded data packet that receives according to bluetooth communication module 1 judges that word for word each word in this font coded data packet has or not the coded message of this word font in data sink, and this module can be selected following action:
Having then, notice extraction font coding module 2 extracts the font coded messages;
Nothing is then notified bluetooth communication module 1 to send instruction notification transmission data set and is sent out the font information packet;
Extract font coding module 2, the font coded message that is used to extract in the data sink produces corresponding font display message and is sent to display module 4;
The font processing module, the font information packet that receives according to bluetooth communication module calculates the display message of font and this result of calculation is sent to display module 4;
Display module 4 is by the LCD display display font;
Voice module 6, it comprises microphone and loud speaker, and microphone is connected in controller by vocoder, and loud speaker is connected in controller by the audio frequency output unit.
Receiving character font data and display font device also comprises: judge the knob module, its judgement has or not the user to send knob information by the knob of bluetooth earphone, and this module can be selected following action:
Insertion enters order, sends instruction notification and sends data set entry communication record module, and execution in step A, and the character font data receiving step sends out article one log in the address list with the form of font coded data packet;
Or insertion exits command, and sends instruction notification transmission data set and withdraws from the address list module status;
Or, insert the previous command, send instruction notification and send data set, execution in step A, the character font data receiving step sends out the last log of this log with the form of font coded data packet;
Or, insert Next Command, send instruction notification and send data set, execution in step A, the character font data receiving step sends out next bar log of this log with the form of font coded data packet;
Or the notice bluetooth earphone is carried out according to the step of former flow process.
Receiving character font data and display font device also comprises: judge the character font data type block, its stem according to the font coded data packet that receives judges that the character font data type is calling number, caller name or calling number and caller name, and this module can be selected following action:
Judge whether the display module in the bluetooth earphone supports digital the demonstration, judges to have or not dialing number information, extracts dialing number information according to the number mark symbol, and dialing number information is sent to judgement font coding module;
Or, judge whether the display module in the bluetooth earphone supports font to show, extract the caller name Word message according to having or not number mark to accord with, and caller name information is sent to judgement font coding module.
The course of work of the reception character font data of present embodiment and the reception character font data of display font device and display font is as follows: can be with reference to the above-mentioned reception character font data and the method for display font.Send data set and adopt following technical scheme: send data set, comprise that receiving communication communication instruction module, bluetooth communication module, controller, memory module, address list module and judgement receives the instruction notification module;
Receive communication communication instruction module, receive the communication communication instruction, and preparation sends the font coded data packet;
Bluetooth communication module, in have transport module, transport module is used for receiving or sends data, transport module comprises:
Send character font data bag module, it is used for extracting in the address list module and does not contain the font coded data packet of font information, and sends this font coded data packet;
Receive request module, it is used to receive the instruction notification that data sink sends out;
Send the font information module, it is used for sending the font information packet according to instruction notification, and it comprises:
Be used to extract the extraction lattice module of the lattice information of this word in the character library; Be used for by sending the sending module that the font information packet sends this word lattice information;
Controller is used for the processing of each module in the control device;
Memory module is used to store the data of the font information of each word;
The address list module is used for the data of store font;
Judge and to receive the instruction notification module that be used to judge whether to receive that request that data sink sends sends the instruction notification of font information packet, this module can be selected following action:
Notice sends the font information module and extracts font information packet transmission font information packet according to instruction notification in memory module;
Or notice sends data set and is in wait state.
Device is bluetooth cellular phone, and the address list module memory stores up each bar address list, and address list comprises calling number and caller name.
The bluetooth cellular phone of present embodiment also comprises: judge the knob information module, it judges that sending data set has or not the knob information that bluetooth earphone sends that receives, and this module can be selected following action:
Insertion enters order, sends data set entry communication record module, and execution in step a, and character font data is sent out
Send step, with article one log of form in bluetooth earphone sends out address list of font coded data packet;
Or insertion exits command, and sends data set and withdraws from the address list module status;
Or, insert the previous command, send data set, execution in step a, the character font data forwarding step sends out the last log of this log to bluetooth earphone with the form of font coded data packet;
Or, insert Next Command, send data set, execution in step a, the character font data forwarding step sends out next bar log of this log to bluetooth earphone with the form of font coded data packet;
Or notice sends data set and carries out according to the step of former flow process.
The course of work of the transmission character font data of the bluetooth cellular phone of present embodiment: can be with reference to above-mentioned transmission character font data method.
Bluetooth cellular phone in the present embodiment also can be bluetooth MP3, its functional module and transmission method can with reference to bluetooth cellular phone functional module and transmission method.Its difference is: the address list module memory stores up each bar address list, replaces caller name with song title; Replace receiving communication communication instruction module with the knob module, the knob module is used to send the knob play instruction, and preparation sends the font coded data packet.
Because the mode that present embodiment is taked is that command request is arranged, and the transmission and the reception of character font data bag are just arranged, so even bluetooth earphone itself possesses character library, technical scheme of the present invention also can be compatible, just do not use the font host-host protocol among the present invention.
The above, only for preferred embodiment of the present invention, so can not limit scope of the invention process with this, i.e. the equivalence of doing according to the present patent application claim and description changes and modification, all should still belong in the scope that patent of the present invention contains.