DYNAMIC TEXT ADJUSTMENT IN A USER INTERFACE ELEMENT
First Claim
1. A method for selecting a font size for text displayed in a display region, comprising:
- detecting a height and a width of the display region;
determining a height and a width of an initial text region defining a minimum region required for displaying the text using a default font size;
defining a plurality of adjusted text regions, each adjusted text region comprising a height and a width, wherein;
the height of each of the plurality of adjusted text regions corresponds to a different number of lines of text within the adjusted text region; and
the width of each of the plurality of adjusted text regions corresponds to the width of the initial text region reduced by a reduction amount corresponding to the number of lines within the adjusted text region;
identifying, for each of the plurality of adjusted text regions, the smaller of the ratio of the height of the display region over the height of the adjusted text region and the ratio of the width of the display region over the width of the adjusted text region;
identifying the one of the plurality of adjusted text regions having the largest of the identified smaller ratios; and
displaying the text in the display region using a reduced font size corresponding to the default font size reduced by the reduction amount of the identified one of the adjusted text regions.
1 Assignment
0 Petitions
Accused Products
Abstract
This is directed to efficiently identifying alternative display attributes for displaying text in a display region when default display attributes are inadequate for displaying the text. Many electronic device user interfaces are designed based on text in a default language. When interfaces are translated for use in other languages, the translated interfaces can include words or phrases that are longer than the corresponding text in the initial language. To quickly find an adequate, alternate display attribute for the longer text (e.g., a new font size), the electronic device can calculate assumed reduced text box sizes for displaying the text should display attributes of the text be reduced. The electronic device can select an adequate reduced text box, and reduce the display attributes by an amount corresponding to the reduced text box.
84 Citations
22 Claims
-
1. A method for selecting a font size for text displayed in a display region, comprising:
-
detecting a height and a width of the display region; determining a height and a width of an initial text region defining a minimum region required for displaying the text using a default font size; defining a plurality of adjusted text regions, each adjusted text region comprising a height and a width, wherein; the height of each of the plurality of adjusted text regions corresponds to a different number of lines of text within the adjusted text region; and the width of each of the plurality of adjusted text regions corresponds to the width of the initial text region reduced by a reduction amount corresponding to the number of lines within the adjusted text region; identifying, for each of the plurality of adjusted text regions, the smaller of the ratio of the height of the display region over the height of the adjusted text region and the ratio of the width of the display region over the width of the adjusted text region; identifying the one of the plurality of adjusted text regions having the largest of the identified smaller ratios; and displaying the text in the display region using a reduced font size corresponding to the default font size reduced by the reduction amount of the identified one of the adjusted text regions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An electronic device for determining a display attribute for displaying text in a display region, comprising a content source and a display module, the display module operative to:
-
receive text to display from a content source; identify a display region in which to display the text using default display attributes; determine that the text does not fit within the identified display region using the default display attributes; define an initial characteristic dimension, corresponding to a smallest region in which the text can fit in one line using the default display attributes; define at least one subsequent characteristic dimension equal to the initial characteristic dimension reduced by a function of a reduction amount and a number of lines over which to wrap the text; identify the at least one subsequent characteristic dimension having a largest value for an attribute function applied to the subsequent characteristic dimension; retrieve display attributes corresponding to the identified at least one subsequent characteristic dimension; and display the text in the display region using the retrieved display attributes. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A method selecting display attributes for text displayed in a display region, comprising:
-
detecting a characteristic dimension of the display region; defining a first text box, wherein the text is displayed in the first text box on one line and wherein the first text box is characterized by a first characteristic dimension; defining a second text box, wherein the text is displayed on two lines in the second text box and wherein the second text box is characterized by a second characteristic dimension equal to the first characteristic dimension reduced by a reduction amount; defining a third text box, wherein the text is displayed on three lines in the third text box and wherein the third text box is characterized by a third characteristic dimension equal to the second characteristic dimension reduced by the reduction amount; identifying the largest ratio of the characteristic dimension of the display region over the first characteristic dimension, the characteristic dimension of the display region over the second characteristic dimension, and the characteristic dimension of the display region over the third characteristic dimension; and displaying, in the display region, the text using display attributes associated with the one of the first text box, second text box and third text box that corresponds to the characteristic dimension of the identified largest ratio. - View Dependent Claims (17, 18, 19, 20, 21)
-
-
22. A computer readable media for selecting a font size for text displayed in a display region, the computer readable media comprising computer program logic recorded thereon for:
-
detecting a height and a width of the display region; determining a height and a width of an initial text region defining a minimum region required for displaying the text using a default font size; defining a plurality of adjusted text regions, each adjusted text region comprising a height and a width, wherein; the height of each of the plurality of adjusted text regions corresponds to a different number of lines of text within the adjusted text region; and the width of each of the plurality of adjusted text regions corresponds to the width of the initial text region reduced by a reduction amount corresponding to the number of lines within the adjusted text region; identifying, for each of the plurality of adjusted text regions, the smaller of the ratio of the height of the display region over the height of the adjusted text region and the ratio of the width of the display region over the width of the adjusted text region; identifying the one of the plurality of adjusted text regions having the largest of the identified smaller ratios; and displaying the text in the display region using a reduced font size corresponding to the default font size reduced by the reduction amount of the identified one of the adjusted text regions.
-
Specification