Multiple font-weights, one @font-face query

I have to import the Klavika font and I’ve received it in multiple shapes and sizes: Klavika-Bold-Italic.otf Klavika-Bold.otf Klavika-Light-Italic.otf Klavika-Light.otf Klavika-Medium-Italic.otf Klavika-Medium.otf Klavika-Regular-Italic.otf Klavika-Regular.otf Now I would like to know if it’s possible to import those into CSS with just one @font-face-query, where I’m defining the weight in the query. I want to avoid copy/pasting … Read more

Adding custom fonts (local) to WordPress?

I have this code: @font-face { font-family: ‘Miller Banner Light’; src: url(‘fonts/Miller-Banner-Light-01.eot’); /* IE9 Compat Modes */ src: url(‘fonts/Miller-Banner-Light-01.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */ url(‘fonts/Miller-Banner-Light-01.woff’) format(‘woff’), /* Pretty Modern Browsers */ url(‘fonts/Miller-Banner-Light-01.ttf’) format(‘truetype’) /* Safari, Android, iOS */ } Which in theory allows to add these fonts to my theme, unfortunately, simply creating the fonts folder … Read more

Dynamically changing font size of UILabel

I currently have a UILabel: factLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 280, 100)]; factLabel.text = @”some text some text some text some text”; factLabel.backgroundColor = [UIColor clearColor]; factLabel.lineBreakMode = UILineBreakModeWordWrap; factLabel.numberOfLines = 10; [self.view addSubview:factLabel]; Throughout the life of my iOS application, factLabel gets a bunch of different values. Some with multiple sentences, others with … Read more

Can I share predefined fonts from theme_support with a gutenberg component?

I have a few fonts defined in my functions.php: add_theme_support(‘editor-font-sizes’, array( array( ‘name’ => esc_attr__(‘Small’, ‘moderna’), ‘size’ => 13, ‘slug’ => ‘small’ ), …… array( ‘name’ => esc_attr__(‘Headline’, ‘moderna’), ‘size’ => 40, ‘slug’ => ‘headline’ ) )); I want to use these defined fonts now in a FontSizePicker Component from Gutenberg. However I do not … Read more

How can I determine what font a browser is actually using to render some text?

My CSS specifies “font-family: Helvetica, Arial, sans-serif;” for the whole page. It looks like Verdana is being used instead on some parts. I would like to be able to verify this. I’ve tried copying and pasting from my browser into Word, but it’s not preserving the font. Is there some way to determine which font … Read more

How can I use Google’s Roboto font on a website?

I want to use Google’s Roboto font on my website and I am following this tutorial: http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15 I have downloaded the file which has a folder structure like this: Now I have three questions: I have css in my media/css/main.css url. So where do I need to put that folder? Do I need to extract … Read more

Algorithm to implement a word cloud like Wordle

Context Take a look at Wordle: http://www.wordle.net/ It’s much better looking than any other word cloud generators I’ve seen Note: the source is not available – read the FAQ: http://www.wordle.net/faq#code My Questions Is there an algorithm available that does what Wordle does? If no, what are some alternatives that produces similar kinds of output? Why … Read more