WO2020248745A1 - 用户界面中字符的显示方法、装置、电子设备及存储介质 - Google Patents

用户界面中字符的显示方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2020248745A1
WO2020248745A1 PCT/CN2020/088984 CN2020088984W WO2020248745A1 WO 2020248745 A1 WO2020248745 A1 WO 2020248745A1 CN 2020088984 W CN2020088984 W CN 2020088984W WO 2020248745 A1 WO2020248745 A1 WO 2020248745A1
Authority
WO
WIPO (PCT)
Prior art keywords
font
character
configuration file
displayed
user interface
Prior art date
Application number
PCT/CN2020/088984
Other languages
English (en)
French (fr)
Inventor
李朋林
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2020248745A1 publication Critical patent/WO2020248745A1/zh

Links

Images

Classifications

    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present disclosure relates to the field of mobile terminal display technology. Specifically, the present disclosure relates to a method, device, electronic device, and storage medium for displaying characters in a user interface.
  • a user interface is an interface displayed on a mobile terminal for realizing human-computer interaction, for example, an interface displayed on an application program, with one or more virtual buttons displayed on the interface, or a list of information content. The user can execute the corresponding function or display the corresponding information by clicking the virtual button.
  • the existing software adjusts the font of the characters in the user interface
  • the purpose of the present disclosure is to solve at least one of the above technical defects.
  • the technical solutions adopted in the present disclosure are as follows:
  • a method for displaying characters in a user interface including:
  • the font configuration file is obtained by sending a font configuration file obtaining request to the server, and the font configuration file is used to obtain corresponding font information based on the character identifier;
  • the characters to be displayed are rendered and displayed according to the font information of the characters to be displayed.
  • the character to be displayed is a designated character in the current user interface.
  • the above method further includes:
  • the receiving server obtains the font configuration file returned by the request based on the font configuration file.
  • the font configuration file stores a first corresponding relationship between the character identifier and the font identifier, and a download path of the font file, and the font file stores a second corresponding relationship between the font identifier and the font information;
  • the method After obtaining the font configuration file, the method also includes:
  • the font information of the character to be displayed is obtained, including:
  • the font information corresponding to the determined font identifier is obtained.
  • the above method further includes:
  • the stored font file is updated.
  • Another method for displaying characters in a user interface includes:
  • the font configuration file is returned to the client based on the font configuration file acquisition request, so that the client can obtain the font information of the character to be displayed according to the obtained character identifier of the character to be displayed in the current user interface and the font configuration file, and The font information of the character is rendered and displayed for the character to be displayed;
  • the font configuration file is used to enable the client to obtain corresponding font information based on the character identifier.
  • an apparatus for displaying characters in a user interface including:
  • the character identification acquisition module is used to acquire the character identification of the character to be displayed in the current user interface
  • the font information obtaining module is used to obtain the font information of the character to be displayed according to the character identifier of the character to be displayed and the font configuration file;
  • the font configuration file is obtained by sending a font configuration file obtaining request to the server, and the font configuration file is used to obtain corresponding font information based on the character identifier;
  • the display module is used to render and display the characters to be displayed according to the font information of the characters to be displayed.
  • the character to be displayed is a designated character in the current user interface.
  • the above device further includes a font configuration file acquisition module, which is used to:
  • the receiving server obtains the font configuration file returned by the request based on the font configuration file.
  • the font configuration file stores a first corresponding relationship between the character identifier and the font identifier, and a download path of the font file, and the font file stores a second corresponding relationship between the font identifier and the font information;
  • the above device further includes:
  • the font file acquisition module is used to acquire font files based on the download path
  • the aforementioned font information acquisition module is used for:
  • the font information corresponding to the determined font identifier is obtained.
  • the above device before receiving the font configuration file returned by the server obtaining the request based on the font configuration file, if the font configuration file is stored locally, after receiving the font configuration file returned by the server obtaining the request based on the font configuration file, the above device further includes:
  • the font file update module is used to update the stored font file based on the received font configuration file.
  • another device for displaying characters in a user interface includes:
  • the acquisition request receiving module is used to receive the font configuration file acquisition request sent by the client;
  • the font configuration file return module is used to return the font configuration file to the client based on the font configuration file obtaining request, so that the client can obtain the character to be displayed according to the obtained character identifier of the character to be displayed in the current user interface and the font configuration file Font information, and render and display the characters to be displayed according to the font information of the characters to be displayed;
  • the font configuration file is used to enable the client to obtain corresponding font information based on the character identifier.
  • an electronic device including: a processor and a memory;
  • Memory used to store operation instructions
  • the processor is configured to execute the method shown in any embodiment of the first aspect or the method shown in any embodiment of the second aspect of the present disclosure by invoking an operation instruction.
  • a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the implementation shown in any one of the embodiments of the first aspect of the present disclosure The method or the method shown in any embodiment of the second aspect.
  • the solution provided by the present disclosure is to obtain the font information corresponding to the character identifier according to the font configuration file sent by the server.
  • the character identifier of the character to be displayed on the current user interface is obtained, and according to the character of the character to be displayed Identify and font configuration files, obtain font information of characters to be displayed, and perform rendering and display according to the obtained font information of characters to be displayed.
  • the solution of the present disclosure is to provide font information for the characters of the user interface through the font configuration file provided by the server.
  • the font information is no longer packaged in the software installation package, the volume of the installation package is reduced, and the font can be updated by The configuration file is used to realize the font adjustment of the characters of the user interface, without the user to update the software operation, which can greatly facilitate the font adjustment of the client user interface and improve the user experience.
  • FIG. 1 is a schematic flowchart of a method for displaying characters in a user interface according to an embodiment of the present disclosure
  • Fig. 2 is a schematic diagram of a current user interface provided according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of another method for displaying characters in a user interface according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a display device for characters in a user interface according to an embodiment of the present disclosure
  • Fig. 5 is a schematic structural diagram of another device for displaying characters in a user interface according to an embodiment of the present disclosure.
  • Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 1 shows a schematic flowchart of a method for displaying characters in a user interface provided by an embodiment of the present disclosure. As shown in FIG. 1, the method may mainly include:
  • Step S110 Obtain the character identifier of the character to be displayed in the current user interface
  • Step S120 Obtain font information of the character to be displayed according to the character identifier of the character to be displayed and the font configuration file;
  • the font configuration file is obtained by sending a font configuration file obtaining request to the server, and the font configuration file is used to obtain corresponding font information based on the character identifier;
  • Step S130 Render and display the character to be displayed according to the font information of the character to be displayed.
  • multiple user interfaces may be configured in the application, and the current user interface may be the user interface to be displayed by the current application.
  • the characters to be displayed can be words, letters, numbers or symbols to be displayed in the current user interface.
  • the character identifier is used to distinguish each character to be displayed. Specifically, according to the position of each character to be displayed in the current user interface, a different character identifier can be assigned to each character to be displayed.
  • the character identifier can be a digital number. form.
  • the font configuration file can provide the correspondence between the character identification of each user interface of the application and the font information, and the font information of the character to be displayed can be obtained based on the font information of the character to be displayed and the font configuration file.
  • the font information may include the information needed to render characters in the user interface.
  • the font information of the character to be displayed can be obtained based on the character identifier and the font configuration file of the character to be displayed, and the rendering and display of the character to be displayed can be realized according to the font information of the character to be displayed.
  • Figure 2 shows a schematic diagram of the current user interface.
  • A, B, C, D, E, and F are all characters to be displayed, and A, B, C, D, E, and F can correspond to There are different character identifiers.
  • the font information corresponding to A, B, C, D, E, and F can be obtained.
  • the font configuration file may be generated by the server, and the client may obtain the font configuration file by sending a font configuration file obtaining request to the server.
  • the solution provided by the present disclosure is to obtain the font information corresponding to the character identifier according to the font configuration file sent by the server.
  • the character identifier of the character to be displayed on the current user interface is obtained, and according to the character of the character to be displayed Identify and font configuration files, obtain font information of characters to be displayed, and perform rendering and display according to the obtained font information of characters to be displayed.
  • the font configuration file provided by the server provides the configuration font information for the characters of the user interface. Since the font information is no longer packaged in the software installation package, the size of the installation package is reduced.
  • the font is packaged in the software installation package.
  • the adjusted font needs to be packaged in the new version of the software installation package, and the new version of the installation package is released ,
  • the user realizes the font adjustment of the characters by downloading and installing the new version of the software installation package.
  • the existing method of adjusting the font of the user interface needs to be implemented through the update of the software version, and requires the user to participate in the installation of the new version of the software, which is relatively inconvenient.
  • the character to be displayed is a designated character in the current user interface.
  • a part of the characters that require font configuration can be designated as the characters to be displayed, and the font information of the characters to be displayed is obtained through the font configuration file, and the rendering is performed to realize the characters to be displayed The font configuration and display.
  • the above method further includes:
  • the receiving server obtains the font configuration file returned by the request based on the font configuration file.
  • the font configuration file can be configured by the server, and the client can obtain the font configuration file by sending a font configuration file obtaining request to the server.
  • the font configuration file can be sent every time the client is started. File acquisition request, or send a font configuration file acquisition request at a preset time interval.
  • the above method further includes: the font configuration file stores a first correspondence between the character identification and the font identification, and the download path of the font file, and the font file stores a second correspondence between the font identification and the font information ;
  • the method After obtaining the font configuration file, the method also includes:
  • the font information of the character to be displayed is obtained, including:
  • the font information corresponding to the determined font identifier is obtained.
  • the download path of the font file may be stored in the font configuration file.
  • the client may download the font file based on the download path of the font file, and the downloaded font file may be cached in the local storage of the client .
  • the font configuration file stores a first corresponding relationship between the character identifier and the font identifier, and based on the first corresponding relationship, the font identifier corresponding to the character identifier of the character to be displayed can be determined;
  • the character identifiers of each user interface of the application stored in the font configuration file are: C0, C1, C2, C3, C4, C5, C6, C7, C8, C9; the font identifiers stored in the font configuration file are respectively Are: F0, F1, F2, F3, F4, F5, F6, F7, F8, F9; the first corresponding relationship is: C0 corresponds to F0, C1 corresponds to F1, C2 corresponds to F2, C3 corresponds to F3, C4 corresponds to F4 corresponds, C5 corresponds to F5, C6 corresponds to F6, C7 corresponds to F7, C8 corresponds to F8, and C9 corresponds to F9.
  • the character identifiers of the characters to be displayed are: C1, C2, C3, and based on the first corresponding relationship, the font identifiers of the characters to be displayed: F1, F2, F3 can be obtained.
  • the font information of the character to be displayed can be obtained based on the second correspondence stored in the font file.
  • the receiving server before the receiving server obtains the font configuration file returned by the request based on the font configuration file, if the font configuration file is stored locally, after the receiving server obtains the font configuration file returned by the request based on the font configuration file, include:
  • the stored font file is updated.
  • the new font configuration file may be received based on the received new font configuration file.
  • the font file is updated.
  • the font identifier in the cached font file can be compared with the font identifier in the new font configuration file to determine the new The font identification of the font is increased, and the font file of the newly added font is obtained according to the download path of the font file corresponding to the font identification of the newly added font and added to the font file in the local cache.
  • FIG. 3 shows a schematic flowchart of another method for displaying characters in a user interface provided by an embodiment of the present disclosure. As shown in FIG. 3, the method may mainly include:
  • Step S210 receiving a font configuration file acquisition request sent by the client
  • Step S220 Return the font configuration file to the client based on the font configuration file obtaining request, so that the client can obtain the font information of the character to be displayed according to the obtained character identifier of the character to be displayed in the current user interface and the font configuration file, and Render and display the characters to be displayed according to the font information of the characters to be displayed;
  • the font configuration file is used to enable the client to obtain corresponding font information based on the character identifier.
  • the font configuration file may be configured by the server, and the client may obtain the font configuration file by sending a font configuration file obtaining request to the server.
  • the server After the server receives the font configuration file acquisition request sent by the client, it can return the font configuration file.
  • the server can return the font configuration file to the client when it detects that the font configuration file has been updated to avoid unnecessary Data transfer.
  • the font configuration file acquisition request can be sent every time the client is started, or the font configuration file acquisition request can be sent at a preset time interval.
  • multiple user interfaces may be configured in the application of the client, and the current user interface may be the user interface to be displayed by the current application.
  • the characters to be displayed can be words, letters, numbers or symbols to be displayed in the current user interface.
  • the character identifier is used to distinguish each character to be displayed. Specifically, according to the position of each character to be displayed in the current user interface, a different character identifier can be assigned to each character to be displayed.
  • the character identifier can be a digital number. form.
  • the font configuration file can provide the correspondence between the character identification of each user interface of the application and the font information, and the font information of the character to be displayed can be obtained based on the font information of the character to be displayed and the font configuration file.
  • the font information includes the information needed to render characters in the user interface.
  • the font information of the character to be displayed can be obtained based on the character identifier and the font configuration file of the character to be displayed, and the rendering and display of the character to be displayed can be realized according to the font information of the character to be displayed.
  • the solution provided by the present disclosure is to obtain the font information corresponding to the character identifier according to the font configuration file sent by the server.
  • the character identifier of the character to be displayed on the current user interface is obtained, and according to the character of the character to be displayed Identify and font configuration files, obtain font information of characters to be displayed, and perform rendering and display according to the obtained font information of characters to be displayed.
  • the font configuration file provided by the server provides the configuration font information for the characters of the user interface. Since the font information is no longer packaged in the software installation package, the size of the installation package is reduced.
  • the font is packaged in the software installation package.
  • the adjusted font needs to be packaged in the new version of the software installation package, and the new version of the installation package is released ,
  • the user realizes the font adjustment of the characters by downloading and installing the new version of the software installation package.
  • the existing method of adjusting the font of the user interface needs to be implemented through the update of the software version, and requires the user to participate in the installation of the new version of the software, which is relatively inconvenient.
  • FIG. 4 shows a schematic structural diagram of a display device for characters in a user interface provided by an embodiment of the present disclosure.
  • the display of characters in the user interface is The device 30 may include:
  • the character identifier obtaining module 310 is used to obtain the character identifier of the character to be displayed in the current user interface
  • the font information obtaining module 320 is configured to obtain the font information of the character to be displayed according to the character identifier of the character to be displayed and the font configuration file;
  • the font configuration file is obtained by sending a font configuration file obtaining request to the server, and the font configuration file is used to obtain corresponding font information based on the character identifier;
  • the display module 330 is configured to render and display the characters to be displayed according to the font information of the characters to be displayed.
  • the device provided by the present disclosure obtains the font information corresponding to the character identifier according to the font configuration file sent by the server.
  • the character identifier of the character to be displayed on the current user interface is obtained, and according to the character of the character to be displayed Identify and font configuration files, obtain font information of characters to be displayed, and perform rendering and display according to the obtained font information of characters to be displayed.
  • the solution of the present disclosure is to provide font information for the characters of the user interface through the font configuration file provided by the server.
  • the font information is no longer packaged in the software installation package, the volume of the installation package is reduced, and the font can be updated by The configuration file is used to realize the font adjustment of the characters of the user interface, without the user to update the software operation, which can greatly facilitate the font adjustment of the client user interface and improve the user experience.
  • the characters to be displayed are designated characters in the current user interface.
  • the above-mentioned apparatus further includes a font configuration file acquisition module, which is used to:
  • the receiving server obtains the font configuration file returned by the request based on the font configuration file.
  • the font configuration file stores a first correspondence between a character identifier and a font identifier, and a download path of the font file, and the font file stores a second correspondence between the font identifier and font information;
  • the above device further includes:
  • Font file acquisition module which is used to acquire font files based on the download path
  • the aforementioned font information acquisition module is used for:
  • the font information corresponding to the determined font identifier is obtained.
  • the above device before receiving the font configuration file returned by the server obtaining the request based on the font configuration file, if the font configuration file is stored locally, after receiving the font configuration file returned by the server obtaining the request based on the font configuration file, the above device further includes :
  • the font file update module is used to update the stored font file based on the received font configuration file.
  • the device for displaying characters in the user interface of this embodiment can execute the method for displaying characters in the user interface shown in FIG. 1 of the present disclosure, and its implementation principles are similar, and will not be repeated here.
  • FIG. 5 shows a schematic structural diagram of another device for displaying characters in a user interface provided by an embodiment of the present disclosure.
  • the characters in the user interface may include:
  • An acquisition request receiving module 410 configured to receive a font configuration file acquisition request sent by the client;
  • the font configuration file return module 420 is used to return the font configuration file to the client based on the font configuration file acquisition request, so that the client can obtain the font configuration file according to the acquired character identifier of the character to be displayed in the current user interface and the font configuration file. Display the font information of the characters, and render and display the characters to be displayed according to the font information of the characters to be displayed;
  • the font configuration file is used to enable the client to obtain corresponding font information based on the character identifier.
  • the device provided by the present disclosure obtains the font information corresponding to the character identifier according to the font configuration file sent by the server.
  • the character identifier of the character to be displayed on the current user interface is obtained, and according to the character of the character to be displayed Identify and font configuration files, obtain font information of characters to be displayed, and perform rendering and display according to the obtained font information of characters to be displayed.
  • the solution of the present disclosure is to provide font information for the characters of the user interface through the font configuration file provided by the server.
  • the font information is no longer packaged in the software installation package, the volume of the installation package is reduced, and the font can be updated by The configuration file is used to realize the font adjustment of the characters of the user interface, without the user to update the software operation, which can greatly facilitate the font adjustment of the client user interface and improve the user experience.
  • the device for displaying characters in the user interface of this embodiment can execute the method for displaying characters in the user interface shown in FIG. 3 of the present disclosure, and the implementation principles are similar, and will not be repeated here.
  • the embodiment of the present disclosure also provides an electronic device, which includes a processor and a memory;
  • Memory which is used to store operation instructions
  • the processor is used to execute the above-mentioned method for displaying characters in the user interface by calling operation instructions.
  • the embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for displaying characters in a user interface is realized.
  • FIG. 6 shows a schematic structural diagram of an electronic device 800 suitable for implementing embodiments of the present disclosure (for example, a terminal device for executing the method for displaying characters in a user interface shown in FIG. 1 or FIG. 3).
  • the terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 800 may include a processing device (such as a central processing unit, a graphics processor, etc.) 801, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 802 or from a storage device 808
  • the program in the memory (RAM) 803 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 800 are also stored.
  • the processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804.
  • An input/output (I/O) interface 805 is also connected to the bus 804.
  • the following devices can be connected to the I/O interface 805: including input devices 806 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 807 such as a device; a storage device 808 such as a magnetic tape and a hard disk; and a communication device 809.
  • the communication device 809 may allow the electronic device 800 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 6 shows an electronic device 800 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
  • the process described above with reference to the flowchart can be implemented as a computer software program.
  • the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802.
  • the processing device 801 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device obtains at least two Internet protocol addresses; sends to the node evaluation device including at least two Internet protocols; The node evaluation request of the protocol address, wherein the node evaluation device selects an Internet Protocol address from at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein the obtained Internet Protocol address indicates the content distribution network Edge node in the.
  • the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet protocol addresses; Among the two Internet Protocol addresses, the Internet Protocol address is selected; the selected Internet Protocol address is returned; where the received Internet Protocol address indicates the edge node in the content distribution network.
  • the computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof.
  • the above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented in a software manner, or may be implemented in a hardware manner.
  • the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses.”

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开实施例提供了一种用户界面中字符的显示方法、装置、电子设备及存储介质。该方法包括:获取当前用户界面中待显示字符的字符标识;根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息;根据待显示字符的字体信息对待显示字符进行渲染并显示。本公开提供的方案,通过服务器提供的字体配置文件来提供为用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积,并且可以通过更新字体配置文件的方式,来实现对用户界面的字符的字体调整,无需用户进行更新软件的操作,能够极大的方便对客户端用户界面的字体调整,提高用户的使用体验。

Description

用户界面中字符的显示方法、装置、电子设备及存储介质
相关申请的交叉引用
本公开要求2019年6月11日在中国知识产权局提交的标题为“用户界面中字符的显示方法、装置、电子设备及存储介质”中国专利申请No.201910502361.9的优先权,通过引用将该中国专利申请公开的全部内容并入本文。
技术领域
本公开涉及移动终端显示技术领域,具体而言,本公开涉及一种用户界面中字符的显示方法、装置、电子设备及存储介质。
背景技术
用户界面是在移动终端上展示的用于实现人机交互的界面,例如,应用程序上展示的界面,界面上展示有一个或多个虚拟按键,或者展示信息内容的列表等。用户可以通过点击虚拟按键执行相应的功能或者展示相应的信息。
为了用户界面的视觉效果,可以对用户界面内的字符设置一些个性化的字体,现有的软件中会将这些字体信息打包到安装包内,导致安装包的体积较大。
现有的软件在对用户界面内的字符的字体进行调整时,是将新的字体信息打包至新版本的安装包内,用户通过新版本的安装包更新软件,实现对用户界面内字符的字体调整,通过这种方式来调整用户界面内字符的字体较为不便,无法满足实际的使用需求。
发明内容
本公开的目的旨在至少能解决上述的技术缺陷之一。本公开所采用的 技术方案如下:
根据本公开实施例的第一方面,提供了一种用户界面中字符的显示方法,该方法包括:
获取当前用户界面中待显示字符的字符标识;
根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息;
其中,字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,字体配置文件用于基于字符标识获取到对应的字体信息;
根据待显示字符的字体信息对待显示字符进行渲染并显示。
可选地,待显示字符为当前用户界面中的指定字符。
可选地,上述方法还包括:
在客户端启动时和/或按照预设时间间隔,向服务器发送字体配置文件获取请求;
接收服务器基于字体配置文件获取请求返回的字体配置文件。
可选地,字体配置文件存储有字符标识与字体标识的第一对应关系,以及字体文件的下载路径,字体文件存储有字体标识与字体信息的第二对应关系;
在获取到字体配置文件后,方法还包括:
基于下载路径,获取字体文件;
根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,包括:
根据第一对应关系,确定待显示字符的字符标识所对应的字体标识;
根据第二对应关系,得到确定出的字体标识所对应的字体信息。
可选地,在接收服务器基于字体配置文件获取请求返回的字体配置文件之前,若本地已存储有字体配置文件,在接收服务器基于字体配置文件获取请求返回的字体配置文件之后,上述方法还包括:
基于接收到的字体配置文件,对已存储的字体文件进行更新。
根据本公开实施例的第二方面,提供了另一种用户界面中字符的显示方法,该方法包括:
接收客户端发送的字体配置文件获取请求;
基于字体配置文件获取请求向客户端返回字体配置文件,以使客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,并根据待显示字符的字体信息对待显示字符进行渲染并显示;
其中,字体配置文件用于使客户端基于字符标识获取到对应的字体信息。
根据本公开实施例的第三方面,提供了一种用户界面中字符的显示装置,该装置包括:
字符标识获取模块,用于获取当前用户界面中待显示字符的字符标识;
字体信息获取模块,用于根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息;
其中,字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,字体配置文件用于基于字符标识获取到对应的字体信息;
显示模块,用于根据待显示字符的字体信息对待显示字符进行渲染并显示。
可选地,待显示字符为当前用户界面中的指定字符。
可选地,上述装置还包括字体配置文件获取模块,其用于:
在客户端启动时和/或按照预设时间间隔,向服务器发送字体配置文件获取请求;
接收服务器基于字体配置文件获取请求返回的字体配置文件。
可选地,字体配置文件存储有字符标识与字体标识的第一对应关系,以及字体文件的下载路径,字体文件存储有字体标识与字体信息的第二对应关系;
在获取到字体配置文件后,上述装置还包括:
字体文件获取模块,用于基于下载路径,获取字体文件;
上述的字体信息获取模块用于:
根据第一对应关系,确定待显示字符的字符标识所对应的字体标识;
根据第二对应关系,得到确定出的字体标识所对应的字体信息。
可选地,在接收服务器基于字体配置文件获取请求返回的字体配置文件之前,若本地已存储有字体配置文件,在接收服务器基于字体配置文件获取请求返回的字体配置文件之后,上述装置还包括:
字体文件更新模块,用于基于接收到的字体配置文件,对已存储的字体文件进行更新。
根据本公开实施例的第四方面,提供了另一种用户界面中字符的显示装置,该装置包括:
获取请求接收模块,用于接收客户端发送的字体配置文件获取请求;
字体配置文件返回模块,用于基于字体配置文件获取请求向客户端返回字体配置文件,以使客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,并根据待显示字符的字体信息对待显示字符进行渲染并显示;
其中,字体配置文件用于使客户端基于字符标识获取到对应的字体信息。
根据本公开实施例的第五方面,提供了一种电子设备,该电子设备包括:处理器和存储器;
存储器,用于存储操作指令;
处理器,用于通过调用操作指令,执行如本公开的第一方面的任一实施方式中所示的方法或第二方面的任一实施方式中所示的方法。
根据本公开实施例的第六方面,提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本公开的第一方面的任一实施方式中所示的方法或者第二方面的任一实施方式中所示的方法。
本公开实施例提供的技术方案带来的有益效果至少是:
本公开提供的方案,是根据服务器发送的字体配置文件来获取到字符标识对应的字体信息,在需要显示当前用户界面时,获取当前用户界面待显示字符的字符标识,并根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,根据获取到的待显示的字符的字体信息进行渲染并显示。本公开的方案,是通过服务器提供的字体配置文件来提供为 用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积,并且可以通过更新字体配置文件的方式,来实现对用户界面的字符的字体调整,无需用户进行更新软件的操作,能够极大的方便对客户端用户界面的字体调整,提高用户的使用体验。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对本公开实施例描述中所需要使用的附图作简单地介绍。
图1为根据本公开实施例提供的一种用户界面中字符的显示方法的流程示意图;
图2为根据本公开实施例提供的一种当前用户界面的示意图;
图3为根据本公开实施例提供的另一种用户界面中字符的显示方法的流程示意图;
图4为根据本公开实施例提供的一种用户界面中字符的显示装置的结构示意图;
图5为根据本公开实施例提供的另一种用户界面中字符的显示装置的结构示意图;以及
图6为根据本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能解释为对本发明的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本公开的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解, 当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。
下面以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开的实施例进行描述。
图1示出了本公开实施例提供的一种用户界面中字符的显示方法的流程示意图,如图1所示,该方法主要可以包括:
步骤S110:获取当前用户界面中待显示字符的字符标识;
步骤S120:根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息;
其中,字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,字体配置文件用于基于字符标识获取到对应的字体信息;
步骤S130:根据待显示字符的字体信息对待显示字符进行渲染并显示。
本公开实施例中,应用程序中可以配置多个用户界面,当前用户界面可以为当前应用程序即将显示的用户界面。待显示字符可以为当前用户界面中待显示的文字、字母、数字或符号等等。字符标识用于对各待显示字符进行区分,具体而言,可以根据各待显示字符在当前用户界面中的位置的不同,为各待显示字符分配不同的字符标识,字符标识可以采用数字编号的形式。
本公开实施例中,字体配置文件可以提供应用程序的各用户界面的字符标识与字体信息的对应关系,可以基于待显示字符的字体信息以及字体配置文件来获取待显示字符的字体信息。字体信息可以包括用户界面中字符在渲染时需要用到的信息。
在显示当前用户界面时,可以基于待显示字符的字符标识与字体配置文件,获取到待显示字符的字体信息,根据待显示字符的字体信息实现对待显示字符的渲染以及显示。
作为示例,图2中示出了当前用户界面的示意图,图2中,A、B、C、D、E以及F均为待显示字符,A、B、C、D、E以及F可以分别对应有不同的字符标识,基于A、B、C、D、E以及F的字符标识以及字体配置文件,可以获取到A、B、C、D、E以及F分别对应的字体信息,根据字体信息,对A、B、C、D、E以及F进行渲染并显示。
本公开实施例中,字体配置文件可以由服务器生成,客户端可以通过向服务器发送字体配置文件获取请求,来获取字体配置文件。
本公开提供的方案,是根据服务器发送的字体配置文件来获取到字符标识对应的字体信息,在需要显示当前用户界面时,获取当前用户界面待显示字符的字符标识,并根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,根据获取到的待显示的字符的字体信息进行渲染并显示。本公开提供的方案,通过服务器提供的字体配置文件来提供为用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积。
现有的应用软件中,字体被打包于软件安装包内,在对用户界面的字符进行字体调整时,需要将调整后的字体打包于新版本的软件安装包内,并发布新版本的安装包,用户通过下载并安装新版本的软件安装包实现对字符的字体调整。现有的调整用户界面的字体的方式,需要通过软件版本的更新才能实现,并且需要用户参与安装新版本的软件,较为不便。
在实际使用中,可能存在需要频繁对用户界面的字符进行字体调整的情况,例如,在进行用户界面字体的A/B测试(A/B Testing)时,需要对不同测试组内的用户分别发布字体不同的用户界面,收集各测试组的用户体验数据和业务数据,最后分析评估出最优的字体方案正式采用。采用本申请提供的方案进行用户界面字体的A/B测试,避免了重复发布新版本软件,并且无需用户参与,用户对调整过程无感知,能够极大的方便对客户端用户界面的字体调整。
在本公开的实施例中,待显示字符为当前用户界面中的指定字符。
本公开实施例中,可以在当前用户界面的所有字符中,将需要进行字体配置的一部分字符指定为待显示字符,通过字体配置文件获取待显示字符的字体信息,并进行渲染,实现对待显示字符的字体配置及显示。
在本公开的实施例中,上述方法还包括:
在客户端启动时和/或按照预设时间间隔,向服务器发送字体配置文件获取请求;
接收服务器基于字体配置文件获取请求返回的字体配置文件。
本公开实施例中,字体配置文件可以由服务器配置,客户端可以通过向服务器发送字体配置文件获取请求的方式来获取字体配置文件,在实际使用中,可以在客户端每次启动时发送字体配置文件获取请求,或者按照预设的时间间隔发送字体配置文件获取请求。
在本公开的实施例中,上述方法还包括:字体配置文件存储有字符标识与字体标识的第一对应关系,以及字体文件的下载路径,字体文件存储有字体标识与字体信息的第二对应关系;
在获取到字体配置文件后,方法还包括:
基于下载路径,获取字体文件;
根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,包括:
根据第一对应关系,确定待显示字符的字符标识所对应的字体标识;
根据第二对应关系,得到确定出的字体标识所对应的字体信息。
本公开实施例中,字体配置文件中可以存储有字体文件的下载路径,客户端可以基于字体文件的下载路径,可以对字体文件进行下载,下载后的字体文件可以被缓存到客户端的本地存储中。
字体配置文件存储有字符标识与字体标识的第一对应关系,基于第一对应关系可以确定出待显示字符的字符标识所对应的字体标识;
作为示例,字体配置文件内存储的应用程序的各用户界面的字符标识分别为:C0、C1、C2、C3、C4、C5、C6、C7、C8、C9;字体配置文件内存储的字体标识分别为:F0、F1、F2、F3、F4、F5、F6、F7、F8、F9; 第一对应关系为:C0与F0对应,C1与F1对应,C2与F2对应,C3与F3对应,C4与F4对应,C5与F5对应,C6与F6对应,C7与F7对应,C8与F8对应,C9与F9对应。待显示字符的字符标识为:C1、C2、C3,基于第一对应关系,可以获取待显示字符的字体标识:F1、F2、F3。
在确定出待显示字符的字符标识所对应的字体标识之后,可以基于字体文件内存储的第二对应关系,得到待显示字符的字体信息。
在本公开的实施例中,在接收服务器基于字体配置文件获取请求返回的字体配置文件之前,若本地已存储有字体配置文件,在接收服务器基于字体配置文件获取请求返回的字体配置文件之后,还包括:
基于接收到的字体配置文件,对已存储的字体文件进行更新。
本公开实施例中,如果客户端已存在字体配置文件,那么在接收到服务器返回的新的字体配置文件时,可以在接收到新的字体配置文件后,基于接收到的新的字体配置文件对字体文件进行更新。
具体而言,当客户端接收到新的字体配置文件时,如果本地已缓存了字体文件,可以将已缓存的字体文件内的字体标识与新的字体配置文件内的字体标识进行比较,确定新增字体的字体标识,并根据新增字体的字体标识对应的字体文件的下载路径,获取新增字体的字体文件并添加至本地缓存中的字体文件。
图3示出了本公开实施例提供的另一种用户界面中字符的显示方法的流程示意图,如图3所示,该方法主要可以包括:
步骤S210:接收客户端发送的字体配置文件获取请求;
步骤S220:基于字体配置文件获取请求向客户端返回字体配置文件,以使客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,并根据待显示字符的字体信息对待显示字符进行渲染并显示;
其中,字体配置文件用于使客户端基于字符标识获取到对应的字体信息。
本公开实施例中,字体配置文件可以由服务器配置,客户端可以通过向服务器发送字体配置文件获取请求的方式来获取字体配置文件。服务器 在接收客户端发送的字体配置文件获取请求后,可以返回字体配置文件,在实际使用中,服务器可以在检测到字体配置文件发生了更新时,向客户端返回字体配置文件,以避免不必要的数据传输。可以在客户端每次启动时发送字体配置文件获取请求,或者按照预设的时间间隔发送字体配置文件获取请求。
本公开实施例中,客户端的应用程序中可以配置多个用户界面,当前用户界面可以为当前应用程序即将显示的用户界面。待显示字符可以为当前用户界面中待显示的文字、字母、数字或符号等等。字符标识用于对各待显示字符进行区分,具体而言,可以根据各待显示字符在当前用户界面中的位置的不同,为各待显示字符分配不同的字符标识,字符标识可以采用数字编号的形式。
本公开实施例中,字体配置文件可以提供应用程序的各用户界面的字符标识与字体信息的对应关系,可以基于待显示字符的字体信息以及字体配置文件来获取待显示字符的字体信息。字体信息包括用户界面中字符的渲染时需要用到的信息。
在显示当前用户界面时,可以基于待显示字符的字符标识与字体配置文件,获取到待显示字符的字体信息,根据待显示字符的字体信息实现对待显示字符的渲染以及显示。
本公开提供的方案,是根据服务器发送的字体配置文件来获取到字符标识对应的字体信息,在需要显示当前用户界面时,获取当前用户界面待显示字符的字符标识,并根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,根据获取到的待显示的字符的字体信息进行渲染并显示。本公开提供的方案,通过服务器提供的字体配置文件来提供为用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积。
现有的应用软件中,字体被打包于软件安装包内,在对用户界面的字符进行字体调整时,需要将调整后的字体打包于新版本的软件安装包内,并发布新版本的安装包,用户通过下载并安装新版本的软件安装包实现对字符的字体调整。现有的调整用户界面的字体的方式,需要通过软件版本 的更新才能实现,并且需要用户参与安装新版本的软件,较为不便。
在实际使用中,可能存在需要频繁调整用户界面的字体的情况,例如,在进行用户界面字体的A/B测试(A/B Testing)时,需要对不同测试组内的用户分别发布字体不同的用户界面,收集各测试组的用户体验数据和业务数据,最后分析评估出最优的字体方案正式采用。采用本申请提供的方案进行用户界面字体的A/B测试,避免了重复发布新版本软件,并且无需用户参与,用户对调整过程无感知,能够极大的方便对客户端用户界面的字体调整。
基于与图1中所示的方法相同的原理,图4示出了本公开实施例提供的一种用户界面中字符的显示装置的结构示意图,如图4所示,该用户界面中字符的显示装置30可以包括:
字符标识获取模块310,其用于获取当前用户界面中待显示字符的字符标识;
字体信息获取模块320,其用于根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息;
其中,字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,字体配置文件用于基于字符标识获取到对应的字体信息;
显示模块330,其用于根据待显示字符的字体信息对待显示字符进行渲染并显示。
本公开提供的装置,是根据服务器发送的字体配置文件来获取到字符标识对应的字体信息,在需要显示当前用户界面时,获取当前用户界面待显示字符的字符标识,并根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,根据获取到的待显示的字符的字体信息进行渲染并显示。本公开的方案,是通过服务器提供的字体配置文件来提供为用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积,并且可以通过更新字体配置文件的方式,来实现对用户界面的字符的字体调整,无需用户进行更新软件的操作,能够极大的方便对客户端用户界面的字体调整,提高用户的使用体验。
在实施例中,待显示字符为当前用户界面中的指定字符。
在实施例中,上述装置还包括字体配置文件获取模块,其用于:
在客户端启动时和/或按照预设时间间隔,向服务器发送字体配置文件获取请求;
接收服务器基于字体配置文件获取请求返回的字体配置文件。
在实施例中,字体配置文件存储有字符标识与字体标识的第一对应关系,以及字体文件的下载路径,字体文件存储有字体标识与字体信息的第二对应关系;
在获取到字体配置文件后,上述装置还包括:
字体文件获取模块,其用于基于下载路径,获取字体文件;
上述的字体信息获取模块用于:
根据第一对应关系,确定待显示字符的字符标识所对应的字体标识;
根据第二对应关系,得到确定出的字体标识所对应的字体信息。
在实施例中,在接收服务器基于字体配置文件获取请求返回的字体配置文件之前,若本地已存储有字体配置文件,在接收服务器基于字体配置文件获取请求返回的字体配置文件之后,上述装置还包括:
字体文件更新模块,其用于基于接收到的字体配置文件,对已存储的字体文件进行更新。
本实施例的用户界面中字符的显示装置可执行本公开图1中所示的用户界面中字符的显示方法,其实现原理相类似,此处不再赘述。
基于与图3中所示的方法相同的原理,图5示出了本公开实施例提供的另一种用户界面中字符的显示装置的结构示意图,如图5所示,该用户界面中字符的显示装置40可以包括:
获取请求接收模块410,其用于接收客户端发送的字体配置文件获取请求;
字体配置文件返回模块420,其用于基于字体配置文件获取请求向客户端返回字体配置文件,以使客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,并根据待显示字符的字体信息对待显示字符进行渲染并显示;
其中,字体配置文件用于使客户端基于字符标识获取到对应的字体信 息。
本公开提供的装置,是根据服务器发送的字体配置文件来获取到字符标识对应的字体信息,在需要显示当前用户界面时,获取当前用户界面待显示字符的字符标识,并根据待显示字符的字符标识以及字体配置文件,获取待显示字符的字体信息,根据获取到的待显示的字符的字体信息进行渲染并显示。本公开的方案,是通过服务器提供的字体配置文件来提供为用户界面的字符配置字体信息,由于字体信息不再被打包于软件安装包内,减小了安装包的体积,并且可以通过更新字体配置文件的方式,来实现对用户界面的字符的字体调整,无需用户进行更新软件的操作,能够极大的方便对客户端用户界面的字体调整,提高用户的使用体验。
本实施例的用户界面中字符的显示装置可执行本公开图3中所示的用户界面中字符的显示方法,其实现原理相类似,此处不再赘述。
本公开实施例还提供了一种电子设备,其包括处理器和存储器;
存储器,其用于存储操作指令;
处理器,其用于通过调用操作指令,执行上述的用户界面中字符的显示方法。
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的用户界面中字符的显示方法。
下面参考图6,其示出了适于用来实现本公开实施例的电子设备800(例如用于执行图1或图3中所示的用户界面中字符的显示方法的终端设备)的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储装置808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有电子设备800操作所需的各种程序 和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质 还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取至少两个网际协议地址;向节点评价设备发送包括至少两个网际协议地址的节点评价请求,其中,节点评价设备从至少两个网际协议地址中,选取网际协议地址并返回;接收节点评价设备返回的网际协议地址;其中,所获取的网际协议地址指示内容分发网络中的边缘节点。
替代地,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收包括至少两个网际协议地址的节点评价请求;从至少两个网际协议地址中,选取网际协议地址;返回选取出的网际协议地址;其中,接收到的网际协议地址指示内容分发网络中的边缘节点。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或 框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种用户界面中字符的显示方法,包括:
    获取当前用户界面中待显示字符的字符标识;
    根据所述待显示字符的字符标识以及字体配置文件,获取所述待显示字符的字体信息;以及
    根据所述待显示字符的字体信息对所述待显示字符进行渲染并显示,
    其中,所述字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,所述字体配置文件用于基于字符标识获取到对应的字体信息。
  2. 根据权利要求1所述的方法,所述待显示字符为所述当前用户界面中的指定字符。
  3. 根据权利要求1所述的方法,还包括:
    在客户端启动时和/或按照预设时间间隔,向所述服务器发送所述字体配置文件获取请求;
    接收所述服务器基于所述字体配置文件获取请求返回的字体配置文件。
  4. 根据权利要求1至3中任一项所述的方法,所述字体配置文件存储有字符标识与字体标识的第一对应关系,以及字体文件的下载路径,所述字体文件存储有字体标识与字体信息的第二对应关系;
    所述方法还包括:
    基于所述下载路径,获取所述字体文件;
    所述根据所述待显示字符的字符标识以及字体配置文件,获取所述待显示字符的字体信息,包括:
    根据所述第一对应关系,确定所述待显示字符的字符标识所对应的字体标识;
    根据所述第二对应关系,得到确定出的字体标识所对应的字体信息。
  5. 根据权利要求2所述的方法,若本地已存储有字体配置文件,所述方法还包括:
    基于接收到的字体配置文件,对已存储的字体文件进行更新。
  6. 一种用户界面中字符的显示方法,包括:
    接收客户端发送的字体配置文件获取请求;
    基于所述字体配置文件获取请求向所述客户端返回字体配置文件,以使所述客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及所述字体配置文件,获取所述待显示字符的字体信息,并根据所述待显示字符的字体信息对所述待显示字符进行渲染并显示;
    其中,所述字体配置文件用于使所述客户端基于字符标识获取到对应的字体信息。
  7. 一种用户界面中字符的显示装置,包括:
    字符标识获取模块,被配置为获取当前用户界面中待显示字符的字符标识;
    字体信息获取模块,被配置为根据所述待显示字符的字符标识以及字体配置文件,获取所述待显示字符的字体信息;以及
    显示模块,被配置为根据所述待显示字符的字体信息对所述待显示字符进行渲染并显示,
    其中,所述字体配置文件是通过向服务器发送字体配置文件获取请求获取到的,所述字体配置文件用于基于字符标识获取到对应的字体信息。
  8. 一种用户界面中字符的显示装置,包括:
    获取请求接收模块,被配置为接收客户端发送的字体配置文件获取请求;
    字体配置文件返回模块,被配置为基于所述字体配置文件获取请求向所述客户端返回字体配置文件,以使所述客户端能够根据获取到的当前用户界面中待显示字符的字符标识以及所述字体配置文件,获取所述待显示字符的字体信息,并根据所述待显示字符的字体信息对所述待显示字符进行渲染并显示;
    其中,所述字体配置文件用于使所述客户端基于字符标识获取到对应 的字体信息。
  9. 一种电子设备,包括处理器和存储器;
    所述存储器,被配置为存储操作指令;
    所述处理器,被配置为通过调用所述操作指令,执行权利要求1-6中任一项所述的方法。
  10. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6中任一项所述的方法。
PCT/CN2020/088984 2019-06-11 2020-05-07 用户界面中字符的显示方法、装置、电子设备及存储介质 WO2020248745A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910502361.9A CN110209315B (zh) 2019-06-11 2019-06-11 用户界面中字符的显示方法、装置、电子设备及存储介质
CN201910502361.9 2019-06-11

Publications (1)

Publication Number Publication Date
WO2020248745A1 true WO2020248745A1 (zh) 2020-12-17

Family

ID=67791952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/088984 WO2020248745A1 (zh) 2019-06-11 2020-05-07 用户界面中字符的显示方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN110209315B (zh)
WO (1) WO2020248745A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209315B (zh) * 2019-06-11 2021-11-02 北京字节跳动网络技术有限公司 用户界面中字符的显示方法、装置、电子设备及存储介质
CN111147354B (zh) * 2019-12-25 2022-04-26 广州方硅信息技术有限公司 消息处理方法、装置、设备及存储介质
CN111273982A (zh) * 2020-01-17 2020-06-12 北京字节跳动网络技术有限公司 操作系统的默认字体确认方法、装置、电子设备和介质
CN111507063A (zh) * 2020-02-27 2020-08-07 平安科技(深圳)有限公司 文本处理方法、装置、设备及计算机可读存储介质
CN112688831B (zh) * 2020-12-23 2022-03-25 北京字节跳动网络技术有限公司 联调测试方法、装置、电子设备及计算机可读存储介质
CN112860958B (zh) * 2021-01-15 2024-01-26 北京百家科技集团有限公司 一种信息显示方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079374A1 (en) * 2010-09-29 2012-03-29 Apple Inc. Rendering web page text in a non-native font
CN103902513A (zh) * 2014-03-21 2014-07-02 北京百度网讯科技有限公司 在终端设备中显示字体的方法及装置
CN104965834A (zh) * 2014-06-25 2015-10-07 腾讯科技(深圳)有限公司 字体显示方法和装置
CN106951421A (zh) * 2016-01-07 2017-07-14 方正璞华软件(武汉)股份有限公司 一种网络字体显示系统及方法
CN109241497A (zh) * 2018-09-27 2019-01-18 腾讯音乐娱乐科技(深圳)有限公司 文本处理方法及装置
CN110209315A (zh) * 2019-06-11 2019-09-06 北京字节跳动网络技术有限公司 用户界面中字符的显示方法、装置、电子设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030226118A1 (en) * 2002-05-28 2003-12-04 E C D Interactive Corp. Method of uploading and editing words at a network station
CN103281433A (zh) * 2013-04-16 2013-09-04 广东欧珀移动通信有限公司 一种显示文字内容的方法及装置
CN104461483A (zh) * 2013-09-16 2015-03-25 北大方正集团有限公司 一种字体渲染的方法、装置、渲染平台客户端和服务器
CN105487889A (zh) * 2015-11-26 2016-04-13 小米科技有限责任公司 应用界面更新方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079374A1 (en) * 2010-09-29 2012-03-29 Apple Inc. Rendering web page text in a non-native font
CN103902513A (zh) * 2014-03-21 2014-07-02 北京百度网讯科技有限公司 在终端设备中显示字体的方法及装置
CN104965834A (zh) * 2014-06-25 2015-10-07 腾讯科技(深圳)有限公司 字体显示方法和装置
CN106951421A (zh) * 2016-01-07 2017-07-14 方正璞华软件(武汉)股份有限公司 一种网络字体显示系统及方法
CN109241497A (zh) * 2018-09-27 2019-01-18 腾讯音乐娱乐科技(深圳)有限公司 文本处理方法及装置
CN110209315A (zh) * 2019-06-11 2019-09-06 北京字节跳动网络技术有限公司 用户界面中字符的显示方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110209315A (zh) 2019-09-06
CN110209315B (zh) 2021-11-02

Similar Documents

Publication Publication Date Title
WO2020248745A1 (zh) 用户界面中字符的显示方法、装置、电子设备及存储介质
US20220261127A1 (en) Information display method and apparatus, electronic device, and computer readable medium
WO2020207085A1 (zh) 信息分享方法、装置、电子设备及存储介质
CN109582310B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
WO2020151599A1 (zh) 视频同步发布方法、装置、电子设备及可读存储介质
WO2021135626A1 (zh) 菜单项选择方法、装置、可读介质及电子设备
US20230015800A1 (en) A method, apparatus, medium and electronic device for configuring a gift list in a live broadcast room
CN109753332B (zh) 用于展现信息的方法和装置
US11861381B2 (en) Icon updating method and apparatus, and electronic device
WO2020156055A1 (zh) 显示界面切换方法、电子设备及计算机可读存储介质
WO2023000888A1 (zh) 云应用的实现方法、装置、电子设备和存储介质
WO2015176352A1 (zh) 一种基于安卓系统的应用间信息交互方法及装置
WO2023231750A1 (zh) 车辆的窗口显示控制方法、装置、车辆和存储介质
CN114035879A (zh) 页面主题色更换方法、装置、电子设备和计算机可读介质
WO2020186927A1 (zh) 数据分享方法、装置、设备及介质
WO2020207083A1 (zh) 信息分享的方法、装置、电子设备及计算机可读存储介质
CN112968871A (zh) 应用程序的登录方法、装置、可读介质和电子设备
CN110147283B (zh) 一种显示内容切换显示方法、装置、设备及介质
CN110619101B (zh) 用于处理信息的方法和装置
CN111767062A (zh) 应用配置数据的更新方法、装置、设备及存储介质
CN111274104B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
WO2023083367A1 (zh) 文件后台续传方法、装置、存储介质及电子设备
CN113391860A (zh) 服务请求处理方法、装置、电子设备及计算机存储介质
CN111382039A (zh) 上报用户行为事件的方法、装置、电子设备及存储介质
WO2021088772A1 (zh) 直播间信息发送方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20822130

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20822130

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 24/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20822130

Country of ref document: EP

Kind code of ref document: A1