Extjs6 dynamically modify font size - extjs6-classic

How to modify the font size of the page in Extjs6, for example, I make a scroll wheel on the page which is small, medium, and large, and then provide the user to choose. After the selection, the overall font of the page is displayed according to the user's choice of size. My Ext version is 6.2 people who want to know Give an implementation suggestion or plan. thank you very much

Related

Is it possible to set the font size for all fonts in a Swift iOS app?

In order for user friendly, i wish to let user customise the font size of entire app in setting page.
Rather than find out every single font and style it, is there any solution to set entire font's size one shot?
You shouldn't set ALL text to be the same size, as that would not look good or be legible, and it goes against Apple's Interface Guidelines for typography.
This would be the opposite of "user friendly". You need some visual weight/hierarchy to distinguish sections of content and their importance, and focus the user's attention. If everything's the same size, it's hard to find what they need.
So, with this in mind, you couldn't just have 1 setting for them - you'd need to have separate settings for every type of text in your app. Apple has already built this functionality for you at the OS level.
This is called "Dynamic Type," which lets you set text sizes based on the purpose of a particular bit of type - headlines, subheads, titles, body text, captions, etc. You don't have to manually find/change fonts.
For example:
let headlineFont = UIFont.preferredFont(forTextStyle: UIFontTextStyle.headline)
let subheadFont = UIFont.preferredFont(forTextStyle: UIFontTextStyle.subheadline)
This isn't an in-app setting as you asked about, but is set in the iOS System Settings. Whatever default font size the user selects in Settings will be reflected in your app. This also requires that you've considered what sort of text each element is. Is it a headline, a label, a caption, etc.

Maximum width of a like button in any language (internationalization)?

I am working on a site that will have very high international distribution and need to understand the maximum width of a like button in any of the available languages.
So far, the biggest Like button I can find is in Russian - http://cl.ly/Jmeb.
Is there a full specification list containing the size of the like button for each available language?
Well, the most robust way to design your site is to not impose tight limits on the size of the Like button. The Facebook Developers topic Internationalization says,
Avoid Layouts Relying on Precise Sizing
Try not to use layouts that depend on the precise onscreen sizes of pieces of text in the original language. For any piece of text, in some languages it is likely to be shorter and in some it will be longer (sometimes significantly so in either direction.) If you have sized your user interface elements such that your text just barely fits, your application will probably not work well in a language with longer words.
Similarly, the Facebook Developers topic Like Button says,
You may need to adjust the width of the Like button to accommodate different languages.
You found a Like button in Russian that is 110 pixels wide. Can your layout work with a button that is 1.5 times as wide? 2 times as wide? 5 times as wide? Then you are probably safe.
But the browser is retrieving they Like button image from Facebook when it displays your page, right? So even if we can give you a full list of the size of the Like button for each available language today, tomorrow Facebook could add another language which has a longer Like button.
That said, Facebook does give code for getting the Like button in any language you choose (see FAQ: How do I display the Like button in different languages?):
src="http://www.facebook.com/plugins/like.php?locale=fr_FR&...
Facebook also publishes an XML file listing the locales that Facebook supports. With a bit of Grep search/replace, we can generate an HTML page which displays Like buttons in all 76 locales listed today. Looking at the width of those buttons, we see that Irish localisation of the Like button is the widest at the moment, with 127 pixels. (On my system, the Like button in Malayalam comes up a bit wider at 169 pixels, but that's because I don't have a Malayalam font installed, so the button displays with missing-glyph boxes.)
So, it looks like the maximum width of a Like button in the languages supported at the moment 169 pixels wide. But, coding to this width is not what Facebook, or good internationalisation design, recommends. Instead, make your layout flexible, and able to cope with wider Like buttons in some locales.

Resizing report to bigger size

This may seem like a stupid question, but I've been looking everywhere to fix this problem and can't seem to find the solution.
So i have a report that is set to a landscape size: 8.5"x11" and i want to set the report to be a legal size: 8.5"x14".
I have gone to page setup and turned on no printer as well as dissociate formatting page size and i have set the page to legal and changed the dimensions to 8.5"x14".
My problem is that the change only shows up in preview mode and i am unable to move the position of the fields in my report in the newly expanded width. So i would like to know if there is a way to change the size of a report in design view or how to position fields outside of the 8.5"x11" dimensions. Or is this not possible?
Any help or suggestions are greatly appreciated.
Thank you.
Quickest answer I can give you:
Load a PDF printer driver. My favorite is CutePDF (except I am ashamed to recommend it at the office... I usually recommend the "MyPrettyPonyPDF").
Once this is loaded, it will look like you have an additional "printer" available. When you select the PDF Driver as printer, you'll have a large selection of add'l page sizes to choose from. The printer I have available has 13 defined paper sizes. With the CutePDF driver, I have 50 defined page sizes. The largest I see is 36in x 108in -- and when you orient that in Landscape, you can camp on it.
Check your margins. The margin area doesn't show up in the Design tab, but would display on the Preview tab. If 'Adjust Automatically' for margins is set, Crystal will just make your margins huge when you dissociate the paper sizes and then increase the horizontal/vertical manually.
Try deselecting 'Adjust Automatically' under the 'Margins' settings, then set 'No Printer', then select a legal paper size. Double check the margins are the size you want and you should be good.
Simplest answer I can think of: try unchecking the No Printer option, set the layout and paper size to Landscape and Legal, and then set the No Printer option on again.

How to increase height of font in pdf

I am using the Leaves Example downloaded from github for ebook reader purpose.Is there any solution in that leaves example to increase /decrease height of font of the pdf.
Is that possible in leaves example or with some other example .Basically what i want is page curl effect same as leaves project and also increase / decrease font height .
If some one can provide code or any idea it would be great help .
Thansks in advance

Length of text that can just fit into one screen without scrolling

I find some iphone book apps have such feature:
One screen one page of text without scrolling. The text can just fit into the whole screen with linebreaks and indentations.
I'm curious of how to implement this. How could I decide the length of text that just fit into the screen. And also, given the whole text, I can calculate out the number of pages.
If this is not possible to be done on iPhone(runtime?), then is it possible to process the text before storing it in app? I mean I calculate how many pages I need(how to split the raw text), probably how many lines per page.
I think this is what you are looking for
iPhone SDK: How do you measure the width and height of a string using Quartz?
The accepted answer gives methods you can call on NSString to calculate sizes
What I did for TouchTomes' books was have two iPhone apps. One was the reader that showed up on the App Store. The other was a renderer that calculated what could fit on each page, that only needed to be run in the simulator to create a book DB that the reader could use.
It would throw up a bunch of text, say 100 words, and see if that overflowed or underflowed. If it underflowed, more text was added (say 20 words) and it would binary search until it found exactly how much text would fit. Then it stored in a SQLite DB a row saying "page 12 shows words 100-228" for example. The app would go through this for each font. Another table held all the words in individual rows (!). An optimization step would chop that table down, combining words that always appeared on the same page no matter what font.
I used a Webkit display so the book could include HTML formatting. Now that really complicated the page breakup (e.g. had to keep italics going from page to page) but it let me include some fancier formatting in the text.
Then the reader app had very little to do to display pages; from the page id look up what range of words go on that page, then throw that text up into a webkit view. The user could jump between pages all over the book very quickly, all the hard CPU work had already been done by the rendering app.