WO2022001553A1 - 字体调节方法、装置、存储介质及电子设备 - Google Patents

字体调节方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2022001553A1
WO2022001553A1 PCT/CN2021/097635 CN2021097635W WO2022001553A1 WO 2022001553 A1 WO2022001553 A1 WO 2022001553A1 CN 2021097635 W CN2021097635 W CN 2021097635W WO 2022001553 A1 WO2022001553 A1 WO 2022001553A1
Authority
WO
WIPO (PCT)
Prior art keywords
font
application program
text
display interface
electronic device
Prior art date
Application number
PCT/CN2021/097635
Other languages
English (en)
French (fr)
Inventor
嵇易冬
邓童虎
孔凡秀
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP21832323.6A priority Critical patent/EP4177782A4/en
Publication of WO2022001553A1 publication Critical patent/WO2022001553A1/zh
Priority to US18/088,379 priority patent/US20230125288A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography

Definitions

  • the present application belongs to the technical field of font adjustment, and in particular, relates to a font adjustment method, device, storage medium and electronic device.
  • Variable Fonts (Variable Fonts) technology is derived from the OpenType v1.8 font format specification released by Adobe, Apple, Google, Microsoft and other companies in 2016. The release of this specification will allow a single font file to support multiple font shapes at the same time, it can compactly encapsulate several fonts in a single font file, and achieve single-axis word redesign space by defining changes within the font.
  • variable fonts which only allows users to customize the width and changes in some interactive details, without noticing the effects of the same word weight in different scenarios.
  • the experience is inconsistent. For example, in the dark mode, the font with the same weight will appear thicker in the reverse mode, which will break the visual balance, so the adjustment of the font is not flexible and intelligent enough.
  • the present application provides a font adjustment method, device, storage medium and electronic device, which can automatically adjust the font weight according to the application type, thereby improving the flexibility of font adjustment.
  • an embodiment of the present application provides a font adjustment method, including:
  • the font in the display interface of the application program is adjusted according to the font reset information.
  • an embodiment of the present application provides a font adjustment device, including:
  • an acquisition module used to acquire the application program currently running on the electronic device
  • a first determining module configured to determine the display type of the application program in a preset correspondence relationship, where the preset correspondence relationship includes part or all of the application program in the electronic device and the corresponding display type;
  • a second determining module configured to determine the word reset information of the display type
  • An adjustment module configured to adjust the font in the display interface of the application program according to the font resetting information.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer enables the computer to execute the above font adjustment method.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • the font in the display interface of the application program is adjusted according to the font reset information.
  • FIG. 1 is a schematic flowchart of a font adjustment method provided by an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of a font adjustment method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a scenario of a font adjustment method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a font adjustment apparatus provided by an embodiment of the present application.
  • FIG. 5 is another schematic structural diagram of a font adjustment apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application provides a font adjustment method, including:
  • the font in the display interface of the application program is adjusted according to the font reset information.
  • the word resetting information includes main text resetting information and title resetting information
  • the step of adjusting the font in the display interface of the application program according to the word resetting information includes:
  • the font of the title is adjusted according to the title resetting information.
  • the step of dividing the text in the display interface of the application into text and titles includes:
  • the text in the display interface is divided into body text and title.
  • the method further includes:
  • the weight value of the target text is increased by a first preset value.
  • the method further includes:
  • the method further includes:
  • the method further includes:
  • the step of determining the display type of the application in the preset corresponding relationship is performed.
  • FIG. 1 is a schematic flowchart of a font adjustment method provided by an embodiment of the present application.
  • the font adjustment method provided in the embodiment of the present application is applied to an electronic device, and the specific process may be as follows:
  • Step 101 acquiring an application program currently running on the electronic device.
  • the above-mentioned application program may be an application program running in the foreground of the electronic device. That is, the above-mentioned application program is an application program that runs in the foreground of the electronic device and is displayed to the user for the user to perform interactive operations.
  • the application program can be detected by detecting the process of the application program. For example, when it is detected that the network video application process is in an open state, it is detected that the currently running foreground application is a network video application.
  • the application after the above-mentioned running application is obtained, it can be further judged whether the application is a preset application, wherein the above-mentioned preset application is some pre-set non-adjustable characters in the electronic device. Heavy applications, such as some applications with high font precision.
  • the preset application program may be set by the user, or may be set by the developer through the system, and the user may add or delete the preset application program. If the current application is not the default application, proceed to step 102, and if the current application is the default application, the current process can be stopped.
  • the number of applications currently running on the electronic device may be one or multiple.
  • two or more application program interfaces can be displayed on the display screen at the same time, and these split-screen applications are all foreground applications.
  • the currently running applications of the electronic device are obtained
  • the program is the above-mentioned multiple split-screen applications.
  • subsequent steps also need to be performed on the above-mentioned multiple application programs, so as to realize the adjustment of the fonts in the display interfaces corresponding to the multiple application programs.
  • Step 102 Determine the display type of the application program in a preset correspondence relationship, where the preset correspondence relationship includes part or all of the application program in the electronic device and the corresponding display type.
  • a corresponding relationship may be preset in the electronic device system, and the preset corresponding relationship includes some or all application programs in the electronic device and corresponding display types.
  • the display types can be divided into three types, namely system type, reading type, and prompt type, which can be pre-classified according to user preferences or classified by the system.
  • the application programs in the above-mentioned preset corresponding relationship may also include all application programs in the application market.
  • the above preset correspondence relationship can be compared according to the application program identifier, and then the display type corresponding to the application program identifier can be found.
  • the above application identification can be the name of the application.
  • the above-mentioned preset correspondence may also include application types and corresponding applications. Display type.
  • the application type of the application can also be obtained, and then compare the above preset correspondence according to the application type, and then find the display type corresponding to the application type. In this way, there is no need to establish a corresponding relationship between each application program and the display type, and the memory occupation of the above-mentioned corresponding relationship database is reduced.
  • the display types of the application are divided into system, reading, and prompt.
  • system fonts pay more attention to the rigor and versatility of fonts, and are suitable for multi-dimensional applications such as systems, tools, and finance.
  • applications in the scene such as video applications, photo applications, social applications, music applications, and life applications, etc.
  • the above application category can be set as the system display type.
  • Reading fonts pay more attention to comfort and transparency, and have higher requirements for font flow and air. They are more immersive font usage scenarios and are suitable for use in sticky notes and reading applications, such as e-book applications and news. applications, comic applications, etc., so the above application category can be set as the reading type display type.
  • prompt fonts pay more attention to recognition and clarity, pay attention to the role of font prompts, and have clear glyphs, which are suitable for use in mobile phone housekeepers, map navigation, and traffic violation applications, such as navigation applications, security applications, etc. , so the above application category can be set as the prompt display type.
  • Step 103 Determine the word reset information of the display type.
  • each display type has pre-set word weight setting information corresponding to it, and the word weight setting information can be a set word weight value. For example, if it is determined that the display type of the application is a system type display type, Then its corresponding word weight value is 320. If it is determined that the display type of the application is a reading type display type, its corresponding word weight value is 270. If it is determined that the display type of the application is a prompt type display type, its corresponding value is 270. The weight value is 360.
  • the weight value corresponding to each of the above display types can also be adjusted by the user.
  • the weight value corresponding to the system type display type is set to an initial value of 320 by the system, and the user can change it to 330.
  • the above-mentioned word resetting information can also set the text font and the title font respectively, wherein The title font can be set according to the body font. For example, adding a preset value to the weight value of the body font is the weight value of the title font. For example, for the system type display type, the weight value of the corresponding text font can be set to 320, and the above preset value can be set to 80, and the weight value of the title text can be calculated to be 400. It can be understood that the above-mentioned weight setting information can also set the weight value of the title text, and then calculate the weight value of the body text by subtracting the preset value from the weight value of the title text.
  • Step 104 Adjust the font in the display interface of the application program according to the font resetting information.
  • the font weight value of all the characters in the display interface of the application is determined according to the above-mentioned font weight setting information, and then the font of the corresponding font weight is called for each character to complete the font adjustment.
  • the weight value of the body font and the weight value of the title font in the display interface of the application program can be determined respectively, and then the font of the corresponding weight is called for the body text, and the font of the corresponding weight is called for the title text.
  • the method further includes:
  • the font adjustment method can obtain the application program currently running on the electronic device, and determine the display type of the application program in a preset correspondence relationship, and the preset correspondence relationship includes part or all of the application programs in the electronic device and For the corresponding display type, determine the word resetting information of the display type, and adjust the font in the display interface of the application program according to the word resetting information.
  • the embodiment of the present application adjusts the font in the display interface of the application according to the font resetting information corresponding to the display type by identifying the display type of the currently running application, thereby improving the flexibility of font adjustment.
  • FIG. 2 is another schematic flowchart of a font adjustment method provided by an embodiment of the application, and the font adjustment method includes:
  • Step 201 acquiring the application program currently running on the electronic device.
  • the above-mentioned application program may be an application program running in the foreground of the electronic device. That is, the above-mentioned application program is an application program that runs in the foreground of the electronic device and is displayed to the user for the user to perform interactive operations. Specifically, the application program can be detected by detecting the process of the application program.
  • Step 202 Determine the display type of the application program in a preset correspondence relationship, where the preset correspondence relationship includes part or all of the application program in the electronic device and the corresponding display type.
  • a corresponding relationship may be preset in the electronic device system, and the preset corresponding relationship includes some or all application programs in the electronic device and corresponding display types.
  • the display type can be divided into three types, namely system type, reading type, and prompt type.
  • Step 203 Determine the word resetting information of the display type, and the word resetting information includes the main text resetting information and the title resetting information.
  • each display type has pre-set word weight setting information corresponding to it, and the word weight setting information can be a set word weight value. For example, if it is determined that the display type of the application is a system type display type, Then the weight value of the text font is 320, and the weight value of the title font is 400; if it is determined that the display type of the application is a reading display type, the weight value of the text font is 270, and the weight value of the title font is 270. is 350; if it is determined that the display type of the application is the prompt type display type, the weight value of the text font is 360, and the weight value of the title font is 440.
  • Step 204 Divide the text in the display interface of the application into a text and a title.
  • Step 205 Adjust the font of the text according to the resetting information of the main text, and adjust the font of the title according to the resetting information of the heading.
  • the text and the title can be divided according to the text labels in the display interface of the application, and then the font of the corresponding weight is called for the text of the text, and the font of the corresponding weight is called for the title text, so as to complete the font adjustment.
  • Step 206 receiving the user operation and selecting the target text in the display interface of the application program according to the user operation.
  • Step 207 Increase the weight value of the target text by a first preset value.
  • the font may also be bolded according to a user operation.
  • a user operation may be received to select the target text in the display interface, for example, the target text may be selected according to the user's swipe trajectory on the display screen, and then the corresponding weight value of the target text may be set. For example, if the weight value of the target text after the font adjustment in step 205 is 320, the weight value of the target text can be increased by 80, that is, 400, and the font of the corresponding weight can be called to complete the target text. 's bold.
  • the above-mentioned user operation may include a first user operation and a second user operation.
  • the first user operation is a sliding operation and the second user operation is a pressing operation
  • the target text may be determined according to the swipe trajectory of the sliding operation. , and then generate an instruction to adjust the word weight according to the pressing operation, so as to avoid accidental touches.
  • Step 208 determine whether the electronic device has a dark mode enabled, and if so, go to step 209 .
  • Step 209 Decrease the weight value of the text in the display interface of the application by a second preset value.
  • the embodiment of the present application also uses the adaptive font engine to automatically reduce the font weight when the user switches the dark mode, so as to achieve the difference between the normal mode and the dark mode. Visual balance of font weight in reverse mode.
  • the font of the main text according to the resetting information of the main text, and after adjusting the font of the title according to the resetting information of the text of the title, to determine whether the dark mode is enabled on the electronic device.
  • the current process can be ended, and if enabled, the weight value of the text in the display interface of the application program can be reduced by a second preset value.
  • FIG. 3 is a schematic diagram of a scene of a font adjustment method provided by an embodiment of the present application.
  • the application program currently running on the electronic device is an e-book application program of "XX reading", so it is determined that the display type corresponding to the application program is the reading display type, and then the characters of the reading display type are obtained.
  • Resetting information including the weight value of the text font is 270, and the weight value of the title font is 350.
  • the font of the display interface is further adjusted. Specifically, the weight value of the text font and the title font is reduced by 20, that is, the weight value of the text font is 250, and the title font is 250.
  • the weight of the font is 330, and then adjusted for dark mode.
  • the font adjustment method can obtain the application program currently running on the electronic device, and determine the display type of the application program in a preset correspondence relationship, and the preset correspondence relationship includes part or all of the application programs in the electronic device and Corresponding display type, determine the word resetting information of the display type.
  • the word resetting information includes the main text resetting information and the title resetting information.
  • the text in the display interface of the application is divided into the main text and the title, according to the main text resetting information.
  • the font of the text is adjusted according to the setting information, the font of the title is adjusted according to the reset information of the title, the font of the text is adjusted according to the reset information of the text, the font of the title is adjusted according to the reset information of the title, and the target
  • the weight value of the text is increased by a first predetermined value, and it is determined whether the electronic device has a dark mode enabled, and if so, the weight value of the text in the display interface of the application program is decreased by a second predetermined value.
  • the embodiment of the present application adjusts the font in the display interface of the application according to the font resetting information corresponding to the display type by identifying the display type of the currently running application, thereby improving the flexibility of font adjustment.
  • FIG. 4 is a schematic structural diagram of a font adjustment apparatus provided by an embodiment of the present application.
  • the font adjustment device 30 includes:
  • an obtaining module 301 used to obtain an application program currently running on the electronic device
  • a first determination module 302 configured to determine the display type of the application program in a preset correspondence relationship, where the preset correspondence relationship includes part or all of the application program in the electronic device and the corresponding display type;
  • the second determination module 303 is used to determine the word reset information of the display type
  • the adjustment module 304 is configured to adjust the font in the display interface of the application program according to the font resetting information.
  • the word resetting information includes main text resetting information and title word resetting information
  • the adjustment module 304 includes:
  • a division sub-module 3041 used to divide the text in the display interface of the application into text and title;
  • the adjustment sub-module 3042 is configured to adjust the font of the text according to the resetting information of the main text, and adjust the font of the title according to the resetting information of the title.
  • the dividing sub-module is specifically configured to obtain the label of the text in the display interface of the application program, and divide the text in the display interface into a text and a title according to the label.
  • the font adjustment device 30 may further include:
  • the receiving module 305 is configured to, after the adjusting module 304 adjusts the font in the display interface of the application program according to the font resetting information, receive a user operation and display it in the application program according to the user operation Select the target text in the interface;
  • the setting module 306 is configured to increase the weight value of the target text by a first preset value.
  • the apparatus further includes:
  • a first judgment module configured to judge whether the electronic device has a dark mode enabled after the adjustment module adjusts the font in the display interface of the application program according to the word resetting information
  • the first processing module is configured to reduce the weight value of the text in the display interface of the application program by a second preset value when the first judgment module judges it to be yes.
  • the apparatus further includes:
  • a second judging module configured to judge whether the electronic device has enabled the easy mode after the second determining module has determined the word reset setting information of the display type
  • the adjustment module is specifically configured to adjust the font in the display interface of the application program according to the font reset information of the display type when the second judgment module judges it to be no.
  • the module determines that it is yes, it determines the font resetting information corresponding to the easy mode, and adjusts the font in the display interface of the application program according to the font resetting information corresponding to the easy mode.
  • the first determination module is specifically configured to determine whether the application program is a preset application program after acquiring the application program currently running on the electronic device, and if so, determine the application program in the preset corresponding relationship. the display type of the application.
  • the font adjustment device 30 of the embodiment of the present application can obtain the application program currently running on the electronic device, and determine the display type of the application program in a preset correspondence relationship, and the preset correspondence relationship includes part or all of the application programs in the electronic device and For the corresponding display type, determine the word resetting information of the display type, and adjust the font in the display interface of the application program according to the word resetting information.
  • the embodiment of the present application adjusts the font in the display interface of the application according to the font resetting information corresponding to the display type by identifying the display type of the currently running application, thereby improving the flexibility of font adjustment.
  • the font adjustment device and the font adjustment method in the above embodiments belong to the same concept, and any method provided in the font adjustment method embodiment can be executed on the font adjustment device.
  • any method provided in the font adjustment method embodiment can be executed on the font adjustment device.
  • please refer to the font adjustment. Embodiments of the method are not repeated here.
  • module can be thought of as a software object that executes on the computing system.
  • the different components, modules, engines, and services described herein can be viewed as objects of implementation on the computing system.
  • the apparatus and method described herein can be implemented in software, and certainly can also be implemented in hardware, which are all within the protection scope of the present application.
  • the embodiments of the present application further provide a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is made to execute the above font adjustment method.
  • Embodiments of the present application also provide an electronic device, such as a tablet computer, a mobile phone, and the like. It includes a processor and a memory, the memory stores a plurality of instructions, wherein the processor loads the instructions in the memory for performing the following steps:
  • the font in the display interface of the application program is adjusted according to the font reset information.
  • the word resetting information includes main text resetting information and title resetting information, wherein, when adjusting the font in the display interface of the application program according to the word resetting information, the The processor described is used to perform the following steps:
  • the font of the title is adjusted according to the title resetting information.
  • the processor is further configured to perform the following steps:
  • the weight value of the target text is increased by a first preset value.
  • the processor is further configured to perform the following steps:
  • the processor is further configured to perform the following steps:
  • the electronic device 400 includes a processor 401 and a memory 402 .
  • the processor 401 is electrically connected to the memory 402 .
  • the processor 400 is the control center of the electronic device 400, uses various interfaces and lines to connect various parts of the entire electronic device, executes the electronic device by running or loading the computer program stored in the memory 402, and calling the data stored in the memory 402. Various functions of the device 400 and data processing are performed to monitor the electronic device 400 as a whole.
  • the memory 402 can be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402 .
  • the memory 402 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of electronic equipment, etc.
  • memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 402 may also include a memory controller to provide processor 401 access to memory 402 .
  • the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more computer programs into the memory 402 according to the following steps, and the processor 401 executes and stores the instructions in the memory 402
  • the computer program in , so as to realize various functions, as follows:
  • the font in the display interface of the application program is adjusted according to the font reset information.
  • the electronic device 400 may further include: a display 403 , a radio frequency circuit 404 , an audio circuit 405 and a power supply 406 .
  • the display 403 , the radio frequency circuit 404 , the audio circuit 405 and the power supply 406 are respectively electrically connected to the processor 401 .
  • the display 403 may be used to display information input by or provided to the user and various graphical user interfaces, which may be composed of graphics, text, icons, video, and any combination thereof.
  • the display 403 may include a display panel, and in some embodiments, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).
  • LCD Liquid Crystal Display
  • OLED Organic Light-Emitting Diode
  • the radio frequency circuit 404 can be used to send and receive radio frequency signals, so as to establish wireless communication with network equipment or other electronic equipment through wireless communication, and to send and receive signals with network equipment or other electronic equipment.
  • the radio frequency circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc.
  • SIM Subscriber Identity Module
  • LNA Low Noise Amplifier
  • the audio circuit 405 may be used to provide an audio interface between the user and the electronic device through speakers and microphones.
  • the audio circuit 506 can convert the received audio data into electrical signals, transmit them to the speaker, and then convert the received audio data into sound signals for output.
  • Power supply 406 may be used to power various components of electronic device 400 .
  • the power supply 406 may be logically connected to the processor 401 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption through the power management system.
  • Power source 406 may also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 400 may further include a camera, a Bluetooth module, and the like, which will not be repeated here.
  • the storage medium may be a magnetic disk, an optical disk, a read only memory (Read Only Memory, ROM), or a random access memory (Random Access Memory, RAM), or the like.
  • the computer program may be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include, for example, an embodiment of the font adjustment method.
  • the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
  • each functional module may be integrated in one processing chip, or each module may exist physically alone, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

一种字体调节方法,包括:接获取电子设备当前运行的应用程序(102),在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型(102),确定显示类型的字重设置信息(103),根据字重设置信息对应用程序的显示界面中的字体进行调节(104)。还提供一种字体调节装置、存储介质和电子设备。

Description

字体调节方法、装置、存储介质及电子设备
本申请要求于2020年07月03日提交中国专利局、申请号为202010636473.6,发明名称为“字体调节方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于字体调节技术领域,尤其涉及一种字体调节方法、装置、存储介质及电子设备。
背景技术
可变字体(Variable Fonts)技术是源于Adobe、Apple、Google、Microsoft等公司于2016年发布的OpenType v1.8字体格式规范。该规范的发布将允许单个字体文件同时支持多个字体形态,它可以将几个字体紧凑地封装在单个字体文件中,通过定义字体内的变化来实现单轴字重设计空间。
但是在现阶段当中,行业普遍的做法还是停留在可变字体的字重变化,仅仅是允许用户自定义宽度、有些交互细节的变化,而没有注意到不同场景下同一字重给人们带来的体验是不一致的。比如在暗色模式下,同样字重的字体在反白模式下会显现更粗,会打破视觉平衡,因此字体的调节还不够灵活和智能。
发明内容
本申请提供一种字体调节方法、装置、存储介质及电子设备,可以根据应用类型自动调整字体的字重,从而提升字体调节的灵活性。
第一方面,本申请实施例提供一种字体调节方法,包括:
获取电子设备当前运行的应用程序;
在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
确定所述显示类型的字重设置信息;
根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
第二方面,本申请实施例提供一种字体调节装置,包括:
获取模块,用于获取电子设备当前运行的应用程序;
第一确定模块,用于在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
第二确定模块,用于确定所述显示类型的字重设置信息;
调节模块,用于根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的字体调节方法。
第四方面,本申请实施例提供一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
获取电子设备当前运行的应用程序;
在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
确定所述显示类型的字重设置信息;
根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的字体调节方法的一种流程示意图。
图2为本申请实施例提供的字体调节方法的另一流程示意图。
图3为本申请实施例提供的字体调节方法的一种场景示意图。
图4为本申请实施例提供的字体调节装置的一种结构示意图。
图5为本申请实施例提供的字体调节装置的另一结构示意图。
图6为本申请实施例提供的电子设备的结构示意图。
图7为本申请实施例提供的电子设备的另一结构示意图。
具体实施方式
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。
在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存***中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实***置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。
本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、***、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。
本申请实施例提供一种字体调节方法,包括:
获取电子设备当前运行的应用程序;
在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
确定所述显示类型的字重设置信息;
根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
在一实施例中,所述字重设置信息包括正文字重设置信息和标题字重设置信息,根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节的步骤,包括:
将所述应用程序的显示界面中的文字划分为正文和标题;
根据所述正文字重设置信息对所述正文的字体进行调节;
根据所述标题字重设置信息对所述标题的字体进行调节。
在一实施例中,将所述应用程序的显示界面中的文字划分为正文和标题的步骤,包括:
获取所述应用程序的显示界面中文字的标签;
根据所述标签将所述显示界面中的文字划分为正文和标题。
在一实施例中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述方法还包括:
接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
将所述目标文字的字重值增加第一预设值。
在一实施例中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述方法还包括:
判断所述电子设备是否开启黑暗模式;
若是,则将所述应用程序的显示界面中文字的字重值减少第二预设值。
在一实施例中,在确定所述显示类型的字重设置信息之后,所述方法还包括:
判断所述电子设备是否开启简易模式;
若否,则根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节;
若是,则确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
在一实施例中,在获取电子设备当前运行的应用程序之后,所述方法还包括:
判断所述应用程序是否为预设应用程序;
若否,则执行在预设对应关系中确定所述应用程序的显示类型的步骤。
请参阅图1,图1为本申请实施例提供的字体调节方法的一种流程示意图。 本申请实施例提供的字体调节方法应用于电子设备,具体流程可以如下:
步骤101,获取电子设备当前运行的应用程序。
在一实施例中,由于后台应用程序并没有显示在电子设备显示屏上,因此不必进行字重调节,因此上述应用程序可以为电子设备前台运行的应用程序。也即上述应用程序为电子设备前台运行并显示给用户以便用户进行交互操作的应用程序,具体可以通过检测应用程序的进程来检测该应用程序。例如,当检测到网络视频应用程序进程处于开启状态时,则即检测到当前运行的前台应用程序为网络视频应用程序。
在一实施例中,在获取到上述正在运行的应用程序之后,还可以进一步判断该应用程序是否为预设应用程序,其中,上述预设应用程序是电子设备中预先设置好的一些无需调整字重的应用程序,比如对字体精确度较高的一些应用程序。该预设应用程序可以是由用户自己设定的,也可以是由开发商通过***设定的,用户可以对预设应用程序进行增加和删减等。若当前应用程序不为预设应用,则继续执行步骤102,若当前应用程序是预设应用,则可以停止当前流程。
在一实施例中,上述电子设备当前运行的应用程序可以为一个也可以为多个。比如当电子设备开启分屏功能时,显示屏当中可以同时显示两个或两个以上的应用程序界面,而这些分屏应用程序都是前台应用程序,此时获取到的电子设备当前运行的应用程序就是上述多个分屏应用程序。进一步的,在后续字体调节的过程中也需要分别对上述多个应用程序执行后续步骤,从而实现对多个应用程序分别对应的显示界面中字体的调整。
步骤102,在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型。
在本申请实施例中,电子设备***中可以预设一个对应关系,该预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型。其中显示类型可以分为三个类型,分别为***类、阅读类、以及提示类,具体可以根据用户喜好进行预先分类或者由***进行分类。
其中,为进一步提升本方案的适用性,上述预设对应关系中的应用程序还 可以包括应用市场当中所有的应用程序。比如,在获取到电子设备当前运行的应用程序之后,可以根据该应用程序标识在上述预设对应关系中对比,然后找到与该应用程序标识对应的显示类型。上述应用程序标识可以为应用程序的名称。
考虑到市场上有许多应用程序是属于同一应用类型的,比如视频类、音乐类、新闻类、拍照类等等,因此在一实施例中,上述预设对应关系还可以包括应用类型以及对应的显示类型。此时,在获取到电子设备当前运行的应用程序之后,还可以获取该应用程序的应用类型,然后根据应用类型在上述预设对应关系中对比,然后找到与该应类型对应的显示类型。这种方式无需建立每一个应用程序与显示类型的对应关系,减少了上述对应关系数据库的内存占用。
举例来说,首先将应用程序的显示类型分为***类、阅读类、以及提示类,其中,***类的字体更重视字体严谨性和通用性,适合在***、工具类、金融类等多维度场景中应用,比如视频类应用程序、拍照类应用程序、社交类应用程序、音乐类应用程序以及生活类应用程序等等,因此可以将上述的应用类别设置为***类显示类型。阅读类的字体更重视舒适性、通透性,对字体流动感、空气感要求更高,是更沉浸的字体使用场景,适合用在便签、阅读类应用中,比如电子书类应用程序、新闻类应用程序、漫画类应用程序等等,因此可以将上述的应用类别设置为阅读类显示类型。进一步的,提示类的字体更重视识别度、清晰度,重视字体提示作用,字形清晰,适合用在手机管家、地图导航、交通违章类的应用中,比如导航类应用程序、安全类应用程序等,因此可以将上述的应用类别设置为提示类显示类型。
步骤103,确定显示类型的字重设置信息。
在一实施例中,每种显示类型都有预先设置与之对应的字重设置信息,该字重设置信息可以为设置的字重值,比如若确定应用程序的显示类型为***类显示类型,则其对应的字重值为320,若确定应用程序的显示类型为阅读类显示类型,则其对应的字重值为270,若确定应用程序的显示类型为提示类显示类型,则其对应的字重值为360。
进一步的,上述每种显示类型对应的字重值还可以由用户进行调整,比如 ***类显示类型对应的字重值由***设置的初始值为320,用户可以将其更改为330。
在一实施例中,考虑到一般应用程序的显示界面中所包含的文字还可以包括不同的类型,比如正文和标题,因此上述字重设置信息还可以分别对正文字体和标题字体进行设置,其中标题字体可以根据正文字体来进行设置,比如将正文字体的字重值加上一个预设值即为标题字体的字重值。举例来说,针对***类显示类型,可以将其对应的正文字体的字重值设为320,将上述预设值设为80,即可计算得到标题文字的字重值为400。可以理解的是,上述字重设置信息还可以设置标题文字的字重值,然后通过该标题文字的字重值减去预设值来计算正文文字的字重值。
步骤104,根据字重设置信息对应用程序的显示界面中的字体进行调节。
在一实施例中,根据上述字重设置信息确定应用程序的显示界面中所有文字的字重值,然后针对每个文字调用相应字重的字体,即可完成字体调节。具体的,可以分别确定应用程序的显示界面中正文字体的字重值和标题字体的字重值,然后针对正文文字调用相应字重的字体,以及针对标题文字调用相应字重的字体。
在实际使用当中,电子设备往往还具备简易模式,也叫做老人模式,而使用该模式的绝大多数为中老年人,此类人群的眼睛大多数会难以识别细、小的字体,因此针对此类特殊人群,本申请实施例也会对字体本身进行调节,设定简易模式类便于特殊人群使用。具体的,无论电子设备当前运行的是什么应用程序,只要检测到电子设备当前开启了简易模式,就需要根据该简易模式类对应的字重设置信息对显示界面中的字体进行调节,也就是说将上述简易模式类对应的字重设置信息应用于所有应用程序的显示界面。比如若确定电子设备当前开启了简易模型,确定简易模式类对应的字重设置信息,该字重设置信息对应的字重值为320,按照该字重值对字体进行调节。也即,在确定所述显示类型的字重设置信息之后,所述方法还包括:
判断所述电子设备是否开启简易模式;
若否,则根据所述显示类型的字重设置信息对所述应用程序的显示界面中 的字体进行调节;
若是,则确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
由上可知,本申请实施例提供的字体调节方法可以获取电子设备当前运行的应用程序,在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型,确定显示类型的字重设置信息,根据字重设置信息对应用程序的显示界面中的字体进行调节。本申请实施例通过识别当前运行应用程序的显示类型,从而根据该显示类型对应的字重设置信息对该应用程序的显示界面中的字体进行调节,提升了字体调节的灵活性。
下面将在上述实施例描述的方法基础上,对本申请的字体调节方法做进一步介绍。参阅图2,图2为本申请实施例提供的字体调节方法的另一流程示意图,该字体调节方法包括:
步骤201,获取电子设备当前运行的应用程序。
其中,上述应用程序可以为电子设备前台运行的应用程序。也即上述应用程序为电子设备前台运行并显示给用户以便用户进行交互操作的应用程序,具体可以通过检测应用程序的进程来检测该应用程序。
步骤202,在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型。
在本申请实施例中,电子设备***中可以预设一个对应关系,该预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型。其中显示类型可以分为三个类型,分别为***类、阅读类、以及提示类。
步骤203,确定显示类型的字重设置信息,字重设置信息包括正文字重设置信息和标题字重设置信息。
在一实施例中,每种显示类型都有预先设置与之对应的字重设置信息,该字重设置信息可以为设置的字重值,比如若确定应用程序的显示类型为***类显示类型,则其正文字体的字重值为320,标题字体的字重值为400;若确定应用程序的显示类型为阅读类显示类型,则其正文字体的字重值为270,标题 字体的字重值为350;若确定应用程序的显示类型为提示类显示类型,则其正文字体的字重值为360,标题字体的字重值为440。
步骤204,将应用程序的显示界面中的文字划分为正文和标题。
步骤205,根据正文字重设置信息对正文的字体进行调节,根据标题字重设置信息对标题的字体进行调节。
在一实施例中,可以根据应用程序的显示界面中文字的标签来划分正文和标题,然后针对正文文字调用相应字重的字体,以及针对标题文字调用相应字重的字,从而完成字体调节。
步骤206,接收用户操作并根据用户操作在应用程序的显示界面中选取目标文字。
步骤207,将目标文字的字重值增加第一预设值。
在一实施例中,还可以根据用户操作对字体进行加粗。具体的,可以先接收用户操作在显示界面中选中目标文字,比如根据用户在显示屏上的划动轨迹选中目标文字,然后针对上述目标文字设置其对应的字重值。举例来说,若上述目标文字在步骤205当中进行字体调节后的字重值为320,则可以将该目标文字的字重值增加80也即400,调用相应字重的字体,从而完成目标文字的加粗。
在一实施例中,上述用户操作可以包括第一用户操作和第二用户操作,比如第一用户操作为滑动操作,第二用户操作为按压操作,则可以根据滑动操作的划动轨迹确定目标文字,再根据按压操作生成调整字重的指令,从而可以避免误触。
步骤208,判断电子设备是否开启黑暗模式,若是则执行步骤209。
步骤209,将应用程序的显示界面中文字的字重值减少第二预设值。
申请人还发现同样字重的字体在反白模式下会显现更粗,因此本申请实施例还通过自适应字体引擎,在用户切换黑暗模式下将字重相应自动缩减,以实现在正常模式与反白模式下字重的视觉平衡。
具体的,本申请实施例还可以在根据正文字重设置信息对正文的字体进行调节,根据标题字重设置信息对标题的字体进行调节之后,判断电子设备是否 开启黑暗模式,若未开启,则可以结束当前流程,若开启,则可以将应用程序的显示界面中文字的字重值减少第二预设值。
举例来说,如图3所示,图3为本申请实施例提供的字体调节方法的一种场景示意图。在该实施例中,电子设备当前运行的应用程序为“XX阅读”的一款电子书应用程序,因此确定该应用程序对应的显示类型为阅读类显示类型,进而获取到阅读类显示类型的字重设置信息,包括正文字体的字重值为270,标题字体的字重值为350,设置完成后进行展示。进一步的,若用户开启了电子设备的黑暗模式,则进一步调整显示界面的字体,具体的,分别将正文字体和标题字体的字重值减20,也即正文字体的字重值为250,标题字体的字重值为330,然后以此进行针对黑暗模式的调整。
由上可知,本申请实施例提供的字体调节方法可以获取电子设备当前运行的应用程序,在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型,确定显示类型的字重设置信息,字重设置信息包括正文字重设置信息和标题字重设置信息,将应用程序的显示界面中的文字划分为正文和标题,根据正文字重设置信息对正文的字体进行调节,根据标题字重设置信息对标题的字体进行调节,根据正文字重设置信息对正文的字体进行调节,根据标题字重设置信息对标题的字体进行调节,将目标文字的字重值增加第一预设值,判断电子设备是否开启黑暗模式,若是则将应用程序的显示界面中文字的字重值减少第二预设值。本申请实施例通过识别当前运行应用程序的显示类型,从而根据该显示类型对应的字重设置信息对该应用程序的显示界面中的字体进行调节,提升了字体调节的灵活性。
请参阅图4,图4为本申请实施例提供的字体调节装置的一种结构示意图。其中该字体调节装置30包括:
获取模块301,用于获取电子设备当前运行的应用程序;
第一确定模块302,用于在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
第二确定模块303,用于确定所述显示类型的字重设置信息;
调节模块304,用于根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
在一实施例中,请参阅图5,在该实施例中,所述字重设置信息包括正文字重设置信息和标题字重设置信息,所述调节模块304包括:
划分子模块3041,用于将所述应用程序的显示界面中的文字划分为正文和标题;
调节子模块3042,用于根据所述正文字重设置信息对所述正文的字体进行调节,根据所述标题字重设置信息对所述标题的字体进行调节。
在一实施例中,所述划分子模块,具体用于获取所述应用程序的显示界面中文字的标签,根据所述标签将所述显示界面中的文字划分为正文和标题。
在一实施例中,所述字体调节装置30还可以包括:
接收模块305,用于在所述调节模块304根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
设置模块306,用于将所述目标文字的字重值增加第一预设值。
在一实施例中,所述装置还包括:
第一判断模块,用于在所述调节模块根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,判断所述电子设备是否开启黑暗模式;
第一处理模块,用于在所述第一判断模块判断为是时,将所述应用程序的显示界面中文字的字重值减少第二预设值。
在一实施例中,所述装置还包括:
第二判断模块,用于在所述第二确定模块确定所述显示类型的字重设置信息之后,判断所述电子设备是否开启简易模式;
所述调节模块,具体用于当所述第二判断模块判断为否时,根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节,当所述第二判断模块判断为是时,确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
在一实施例中,所述第一确定模块,具体用于在获取电子设备当前运行的 应用程序之后,判断所述应用程序是否为预设应用程序,若是,则在预设对应关系中确定所述应用程序的显示类型。
由上述可知,本申请实施例的字体调节装置30可以获取电子设备当前运行的应用程序,在预设对应关系中确定应用程序的显示类型,预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型,确定显示类型的字重设置信息,根据字重设置信息对应用程序的显示界面中的字体进行调节。本申请实施例通过识别当前运行应用程序的显示类型,从而根据该显示类型对应的字重设置信息对该应用程序的显示界面中的字体进行调节,提升了字体调节的灵活性。
本申请实施例中,字体调节装置与上文实施例中的字体调节方法属于同一构思,在字体调节装置上可以运行字体调节方法实施例中提供的任一方法,其具体实现过程详见字体调节方法的实施例,此处不再赘述。
本文所使用的术语“模块”可看作为在该运算***上执行的软件对象。本文所述的不同组件、模块、引擎及服务可看作为在该运算***上的实施对象。而本文所述的装置及方法可以以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。
本申请实施例还提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的字体调节方法。
本申请实施例还提供一种电子设备,如平板电脑、手机等。包括处理器和存储器,所述存储器存储有多条指令,其中,所述处理器加载所述存储器中的指令用于执行以下步骤:
获取电子设备当前运行的应用程序;
在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
确定所述显示类型的字重设置信息;
根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
在一实施例中,所述字重设置信息包括正文字重设置信息和标题字重设置信息,其中,根据所述字重设置信息对所述应用程序的显示界面中的字体进行 调节时,所述处理器用于执行以下步骤:
将所述应用程序的显示界面中的文字划分为正文和标题;
根据所述正文字重设置信息对所述正文的字体进行调节;
根据所述标题字重设置信息对所述标题的字体进行调节。
在一实施例中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述处理器还用于执行以下步骤:
接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
将所述目标文字的字重值增加第一预设值。
在一实施例中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述处理器还用于执行以下步骤:
判断所述电子设备是否开启黑暗模式;
若是,则将所述应用程序的显示界面中文字的字重值减少第二预设值。
在一实施例中,在确定所述显示类型的字重设置信息之后,所述处理器还用于执行以下步骤:
判断所述电子设备是否开启简易模式;
若否,则根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节;
若是,则确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
请参阅图6,电子设备400包括处理器401以及存储器402。其中,处理器401与存储器402电性连接。
处理器400是电子设备400的控制中心,利用各种接口和线路连接整个电 子设备的各个部分,通过运行或加载存储在存储器402内的计算机程序,以及调用存储在存储器402内的数据,执行电子设备400的各种功能并处理数据,从而对电子设备400进行整体监控。
存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。
在本申请实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器402中,并由处理器401运行存储在存储器402中的计算机程序,从而实现各种功能,如下:
获取电子设备当前运行的应用程序;
在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
确定所述显示类型的字重设置信息;
根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
请一并参阅图7,在一些实施方式中,电子设备400还可以包括:显示器403、射频电路404、音频电路405以及电源406。其中,其中,显示器403、射频电路404、音频电路405以及电源406分别与处理器401电性连接。
显示器403可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器403可以包括显示面板,在一些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。
射频电路404可以用于收发射频信号,以通过无线通信与网络设备或其他 电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。
音频电路405可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出。
电源406可以用于给电子设备400的各个部件供电。在一些实施例中,电源406可以通过电源管理***与处理器401逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。电源406还可以包括一个或一个以上的直流或交流电源、再充电***、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管图7中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM)、或者随机存取记忆体(Random Access Memory,RAM)等。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对本申请实施例的字体调节方法而言,本领域普通测试人员可以理解实现本申请实施例字体调节方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如字体调节方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。
对本申请实施例的字体调节装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功 能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种字体调节方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种字体调节方法,其中,所述方法包括以下步骤:
    获取电子设备当前运行的应用程序;
    在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
    确定所述显示类型的字重设置信息;
    根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
  2. 根据权利要求1所述的字体调节方法,所述字重设置信息包括正文字重设置信息和标题字重设置信息,其中,根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节的步骤,包括:
    将所述应用程序的显示界面中的文字划分为正文和标题;
    根据所述正文字重设置信息对所述正文的字体进行调节;
    根据所述标题字重设置信息对所述标题的字体进行调节。
  3. 根据权利要求2所述的字体调节方法,其中,将所述应用程序的显示界面中的文字划分为正文和标题的步骤,包括:
    获取所述应用程序的显示界面中文字的标签;
    根据所述标签将所述显示界面中的文字划分为正文和标题。
  4. 根据权利要求1所述的字体调节方法,其中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述方法还包括:
    接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
    将所述目标文字的字重值增加第一预设值。
  5. 根据权利要求1所述的字体调节方法,其中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述方法还包括:
    判断所述电子设备是否开启黑暗模式;
    若是,则将所述应用程序的显示界面中文字的字重值减少第二预设值。
  6. 根据权利要求1所述的字体调节方法,其中,在确定所述显示类型的字重设置信息之后,所述方法还包括:
    判断所述电子设备是否开启简易模式;
    若否,则根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节;
    若是,则确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
  7. 根据权利要求1所述的字体调节方法,其中,在获取电子设备当前运行的应用程序之后,所述方法还包括:
    判断所述应用程序是否为预设应用程序;
    若否,则执行在预设对应关系中确定所述应用程序的显示类型的步骤。
  8. 一种字体调节装置,其中,所述装置包括:
    获取模块,用于获取电子设备当前运行的应用程序;
    第一确定模块,用于在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
    第二确定模块,用于确定所述显示类型的字重设置信息;
    调节模块,用于根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
  9. 根据权利要求8所述的字体调节装置,所述字重设置信息包括正文字重设置信息和标题字重设置信息,其中,所述调节模块包括:
    划分子模块,用于将所述应用程序的显示界面中的文字划分为正文和标题;
    调节子模块,用于根据所述正文字重设置信息对所述正文的字体进行调节,根据所述标题字重设置信息对所述标题的字体进行调节。
  10. 根据权利要求9所述的字体调节装置,其中,
    所述划分子模块,具体用于获取所述应用程序的显示界面中文字的标签,根据所述标签将所述显示界面中的文字划分为正文和标题。
  11. 根据权利要求8所述的字体调节装置,其中,所述装置还包括:
    接收模块,用于在所述调节模块根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
    设置模块,用于将所述目标文字的字重值增加第一预设值。
  12. 根据权利要求8所述的字体调节装置,其中,所述装置还包括:
    第一判断模块,用于在所述调节模块根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,判断所述电子设备是否开启黑暗模式;
    第一处理模块,用于在所述第一判断模块判断为是时,将所述应用程序的显示界面中文字的字重值减少第二预设值。
  13. 根据权利要求8所述的字体调节装置,其中,所述装置还包括:
    第二判断模块,用于在所述第二确定模块确定所述显示类型的字重设置信息之后,判断所述电子设备是否开启简易模式;
    所述调节模块,具体用于当所述第二判断模块判断为否时,根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节,当所述第二判断模块判断为是时,确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
  14. 根据权利要求8所述的字体调节装置,其中,
    所述第一确定模块,具体用于在获取电子设备当前运行的应用程序之后,判断所述应用程序是否为预设应用程序,若是,则在预设对应关系中确定所述应用程序的显示类型。
  15. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至7任一项所述的字体调节方法。
  16. 一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,其中,所述处理器加载所述存储器中的指令用于执行以下步骤:
    获取电子设备当前运行的应用程序;
    在预设对应关系中确定所述应用程序的显示类型,所述预设对应关系包括电子设备中部分或者全部应用程序以及对应的显示类型;
    确定所述显示类型的字重设置信息;
    根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节。
  17. 根据权利要求16所述的电子设备,所述字重设置信息包括正文字重设置信息和标题字重设置信息,其中,根据所述字重设置信息对所述应用程序 的显示界面中的字体进行调节时,所述处理器用于执行以下步骤:
    将所述应用程序的显示界面中的文字划分为正文和标题;
    根据所述正文字重设置信息对所述正文的字体进行调节;
    根据所述标题字重设置信息对所述标题的字体进行调节。
  18. 根据权利要求16所述的电子设备,其中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述处理器还用于执行以下步骤:
    接收用户操作并根据所述用户操作在所述应用程序的显示界面中选取目标文字;
    将所述目标文字的字重值增加第一预设值。
  19. 根据权利要求16所述的电子设备,其中,在根据所述字重设置信息对所述应用程序的显示界面中的字体进行调节之后,所述处理器还用于执行以下步骤:
    判断所述电子设备是否开启黑暗模式;
    若是,则将所述应用程序的显示界面中文字的字重值减少第二预设值。
  20. 根据权利要求16所述的电子设备,其中,在确定所述显示类型的字重设置信息之后,所述处理器还用于执行以下步骤:
    判断所述电子设备是否开启简易模式;
    若否,则根据所述显示类型的字重设置信息对所述应用程序的显示界面中的字体进行调节;
    若是,则确定所述简易模式对应的字重设置信息,并根据所述简易模式对应的字重设置信息对所述应用程序的显示界面中的字体进行调节。
PCT/CN2021/097635 2020-07-03 2021-06-01 字体调节方法、装置、存储介质及电子设备 WO2022001553A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21832323.6A EP4177782A4 (en) 2020-07-03 2021-06-01 FONT ADJUSTMENT METHOD AND APPARATUS, STORAGE MEDIUM AND ELECTRONIC DEVICE
US18/088,379 US20230125288A1 (en) 2020-07-03 2022-12-23 Font adjustment method and apparatus, storage medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010636473.6A CN111832253A (zh) 2020-07-03 2020-07-03 字体调节方法、装置、存储介质及电子设备
CN202010636473.6 2020-07-03

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/088,379 Continuation US20230125288A1 (en) 2020-07-03 2022-12-23 Font adjustment method and apparatus, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2022001553A1 true WO2022001553A1 (zh) 2022-01-06

Family

ID=72900096

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097635 WO2022001553A1 (zh) 2020-07-03 2021-06-01 字体调节方法、装置、存储介质及电子设备

Country Status (4)

Country Link
US (1) US20230125288A1 (zh)
EP (1) EP4177782A4 (zh)
CN (1) CN111832253A (zh)
WO (1) WO2022001553A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832253A (zh) * 2020-07-03 2020-10-27 Oppo广东移动通信有限公司 字体调节方法、装置、存储介质及电子设备
CN113961299A (zh) * 2021-11-17 2022-01-21 拉扎斯网络科技(上海)有限公司 内容显示方法、装置、电子设备、存储介质和程序产品
CN114970449B (zh) * 2022-07-08 2022-11-01 青岛希望鸟科技有限公司 一种应用于同屏交流的字体处理方法
CN116702701A (zh) * 2022-10-26 2023-09-05 荣耀终端有限公司 字重调节方法、终端及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060139312A1 (en) * 2004-12-23 2006-06-29 Microsoft Corporation Personalization of user accessibility options
CN102830918A (zh) * 2012-08-02 2012-12-19 东莞宇龙通信科技有限公司 移动终端及该移动终端调节显示字体大小的方法
CN105607733A (zh) * 2015-08-25 2016-05-25 宇龙计算机通信科技(深圳)有限公司 调节方法、调节装置和终端
CN106528131A (zh) * 2016-10-26 2017-03-22 北京小米移动软件有限公司 应用功能显示方法、装置及终端设备
CN109101312A (zh) * 2018-08-30 2018-12-28 Oppo广东移动通信有限公司 应用界面编辑方法、装置、存储介质及移动终端
CN111832253A (zh) * 2020-07-03 2020-10-27 Oppo广东移动通信有限公司 字体调节方法、装置、存储介质及电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231602B1 (en) * 2000-11-29 2007-06-12 Microsoft Corporation Live preview for reformatting document text
US10699072B2 (en) * 2016-08-12 2020-06-30 Microsoft Technology Licensing, Llc Immersive electronic reading
US11726561B2 (en) * 2018-09-24 2023-08-15 Eyedaptic, Inc. Enhanced autonomous hands-free control in electronic visual aids

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060139312A1 (en) * 2004-12-23 2006-06-29 Microsoft Corporation Personalization of user accessibility options
CN102830918A (zh) * 2012-08-02 2012-12-19 东莞宇龙通信科技有限公司 移动终端及该移动终端调节显示字体大小的方法
CN105607733A (zh) * 2015-08-25 2016-05-25 宇龙计算机通信科技(深圳)有限公司 调节方法、调节装置和终端
CN106528131A (zh) * 2016-10-26 2017-03-22 北京小米移动软件有限公司 应用功能显示方法、装置及终端设备
CN109101312A (zh) * 2018-08-30 2018-12-28 Oppo广东移动通信有限公司 应用界面编辑方法、装置、存储介质及移动终端
CN111832253A (zh) * 2020-07-03 2020-10-27 Oppo广东移动通信有限公司 字体调节方法、装置、存储介质及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4177782A4

Also Published As

Publication number Publication date
EP4177782A1 (en) 2023-05-10
US20230125288A1 (en) 2023-04-27
EP4177782A4 (en) 2023-12-27
CN111832253A (zh) 2020-10-27

Similar Documents

Publication Publication Date Title
WO2022001553A1 (zh) 字体调节方法、装置、存储介质及电子设备
US20170235435A1 (en) Electronic device and method of application data display therefor
US11175968B2 (en) Embedding an interface of one application into an interface of another application
US10956280B2 (en) Data backup method, electronic device, and storage medium
CN108549519B (zh) 分屏处理方法、装置、存储介质和电子设备
US20160209906A1 (en) Electronic device for controlling power and method therefor
CN108287918B (zh) 基于应用页面的音乐播放方法、装置、存储介质和电子设备
WO2022063165A1 (zh) 功能执行方法及装置
WO2020063030A1 (zh) 主题色彩的调节方法、装置、存储介质及电子设备
US11431182B2 (en) Resource statistics collection method and apparatus and terminal
CN111309216B (zh) 列表页面的显示方法、装置、计算机设备及存储介质
US20160342316A1 (en) Electronic device and user interface display method for the same
CN109254801A (zh) 启动、配置方法,装置,设备,介质和操作***
CN105808307B (zh) 一种页面显示方法和装置
US20200120204A1 (en) Method and Apparatus for Customizing Status Bar of Terminal, and Electronic Device
CN104615432B (zh) 闪屏信息处理方法及客户端
CN110618852B (zh) 视图处理方法、视图处理装置及终端设备
US20240089223A1 (en) Information display method and apparatus, and electronic device
CN111240776B (zh) 动态壁纸设置方法、装置、存储介质及电子设备
WO2021092806A1 (zh) 一种屏幕参数调整方法、装置及终端设备
CN116594616A (zh) 一种组件配置方法、装置及计算机可读存储介质
CN108920065B (zh) 分屏窗口调节方法、装置、存储介质及电子设备
CN112966201B (zh) 对象处理方法、装置、电子设备以及存储介质
CN107621903B (zh) 一种双触摸屏设备及其响应控制方法
CN108958929B (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: 21832323

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2021832323

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE