Community Questions & Answers
Titanium Studio code font size keep shrinking
I am using Titanium Studio, build: 2.0.2.201205041518 Every time I paste code from another app, or quit and re-open a file, the code font has gone down to like 9 pt type. My preferences are for Menlo 12pt. I have to open prefs, change the size or font...
font size differs in phone from emulator
i have changed various font-sizes and tested in emulator and as well as phone.... every time I vary font size it shows difference in emulator but in my phone only default font (vary small) is appearing every time.. can any solve my problem!
Problem with fontWeight when including two fonts
So I have successfully included two font files. They are the same font but of different weights "Source Sans Pro" however one is listed as "Regular" font weight and one is "ExtraLight". Now in my app only the regular font...
Alloy - Flatten the font styles
Hi, I'm having the same problem as this thread: [Is it possible to use a default font for all labels troughout the app? my solution with themes in alloy doesnt...
Custom font renders blurry sometimes on iOS/iPad
See [screenshot](https://dl.dropboxusercontent.com/u/2733882/Screen%20Shot%202013-05-10%20at%2011.28.51%20PM.png) We're using a few custom fonts in our app and we're finding that the font displays blurry in some spots, but only on non-retina iPads. The...
iOS - problems with fonts
Good evening, i want change the font from a label. I had read the documentation but it does not work for me. http://docs.appcelerator.com/titanium/latest/#!/guide/Custom_Fonts I try many fonts like "Arial" or "Helvetica" also i...
Font Family Picker
I am planning to make font picker using Alloy but before I can start I have few question regarding this. How do I get the default list of font family e.g in android so I can display it for picking? If I use custom font, do I simply put the .otf file inside...
info: font-family available on iPhone
- Font: AmericanTypewriter - Font: AmericanTypewriter-Bold - Font: AppleGothic - Font: ArialMT - Font: Arial-BoldMT - Font: Arial-BoldItalicMT - Font: Arial-ItalicMT - Font: ArialRoundedMTBold - Font: ArialUnicodeMS - Font: Courier - Font:...
Setting the Font Size and Family in an Alloy Application
Hi there- Is it at all possible to set the font family/size of a SearchBar control for an Alloy (or other) application? In addition, I am also looking to change the default background from the white inset...I am assuming that an image is the only way to...
Embed fonts on iOS?
Is there a way to embed a font (such as an OTF or EOT) in a resources folder and then use that font in labels and such? ----- SDK 1.7.2, OS 10.7.1, iOS 4+
Custom Fonts and styles
Hello, I recently managed to install "Myriad Pro" on the iPhone. I registered 3 versions: 1. MyriadPro-Regular.otf 2. MyriadPro-Semibold.otf 3. MyriadPro-Conf.otf I can select the font by the property fontFamily but how can I change the...
Where Should Custom Fonts Be Placed in the Alloy File System
Hi there- I see that within the Kitchen Sink application of a non Alloy application, I can place a custom font otf file in the Resources/etc directory and reference the font family. In the new Alloy directory structure, when using a custom font, where...
Setting a Button's Font Properties with Alloy Styles
How can I set the font properties of a button using Alloy styles? I am trying the below, but the styles do not apply to the button (as they do in the Label control). Is this also possible inline within the button control, and if so, how so? Thanks in...
Specifying font weights using custom fonts in iOS
Hi all, I'm tearing my hair out over custom fonts on an iOS app. I've used them before with no issue, but only ever using 1 font and not using various weights. So I've done the Plist update, added the 2 fonts I want to use to the Resources folder and...
Custom Fonts in iOS Alloy.
I got trouble to set custom fonts in Alloy project specially in iOS platform for any other font other than default font. Android is running without any modification by same code. Using: ####Mac OS X 10.8.2 (12C3103), Titanium Studio build:...
Custom fonts with multiple variations not working with Alloy and Titanium 3.0.2
I've followed all of the instructions to get the custom fonts loaded properly into the app. It seems as though that's working properly as I'm able to reference the standard font ("Open Sans", in this case) without issue. The problem I have is...
Global Styles - font-family
Hi all. I'm running under Titanium SDK 3.0.2 and iOS 6.1. Any idea why this doesn't work? `app.js` ~~~ var self = Ti.UI.createWindow({ className:'mainWindowClass' }); var myLabel = Ti.UI.createLabel({ text:'This is a label', ...
WebView and font-family css problem
How can i set custom font to different tags in HTML loaded in webView? ~~~ <html> <head> <title> </title> </head> <style type="text/css"> h1 {font-family:...
Custom Font
In my app I'm trying to use custom fonts (OpenSans.ttf and Montserrat.ttf from Google Web Fonts). I followed all steps from the [docs guide](http://docs.appcelerator.com/titanium/latest/#!/guide/Custom_Fonts), but the fonts doesn't show up in my app. I...
Alloy: setting fontSize with SP value for android
hi, I tried to set the fontSize with sp unit in .tss like so: ~~~ font:{ fontSize: 17sp } ~~~ and: ~~~ font:{ fontSize: '17sp' } ~~~ but both don't work. What's the proper way to set this? thanks!!
Custom font in Alloy on MobileWeb
I have an Alloy project that is delivered to Mobile Web. It has a custom font installed in app/assets/fonts/Test Font.ttf I am using the following in the .tss file, but get nothing. If I change it to a font that Titanium knows about, eg Helvetica, it...
How to apply more than one custom fonts at a time in single project.
Application type: mobile Titanium SDK: 3.0.0 How to apply more than one custom fonts in single app ? I am not getting effect of font style when I have added two custom fonts. But when I have removed one custom fonts the other one is working now. Any way...
Changing default font
Hey Developers, I just got my custom font working, but now I want to have this font set on every label in my app. Is there a way to change the default font into my custom font or do I really have to set the fontFamily property for every single label in my...
Custom font glyph as tab icon
I'm looking to one of the symbolset fonts in my application and I'm wondering if it's possible to use a font glyph as a Ti.UI.Tab.icon ?
Custom fonts on iOS device (1.8.0.1)
We are using a custom font that works fine in the simulator but does not get installed when running on a device. The font is referenced in the generated info.plist file but the otf doesn't get moved to the build resources. I tried copying the file to...
how to set font in .tss file
i have tried this but it did not work "#lbl":{ textAlign:'right', bottom:'75', color:'#fff', font:'{ fontSize:24,fontWeigth:bold }' }
For custom font text shifted top
Hi, I'm using embedded custom fonts (HelveticaNeueLTPro-Bd for example) and all my labels and button titles are shifted top (depending on font size from 5 to 15px). What could cause it? And could I specify offset for button text so I won't need to create a...
LineHeight property on labels?
I seem to recall being able to set the lineHeight (aka "leading") on a text label. That currently has no effect or an unexpected one. I have a label with fontSize: 14 and wanted lineHeight:16 but when I tried that only the first line appeared...
Is it possible to use a default font for all labels troughout the app? my solution with themes in alloy doesnt work
Hello, What i want to achieve is to create some default style sheet, in which i define the default style of all elements. I got this working, because i use alloy and i am using themes. All works as i suppose it would work. i create a theme, and all...
Button Bar label font size not change
Hi all, I am using latest titanium studio and latest titanium sdk. I can not change button bar label font size in alloy. please help me to solve my problem ~~~ <ButtonBar platform="ios" onClick="buttonBar" fontSize =...
Is it possible to strike-through a text?
I know this is a very stupid question, as the [Font](http://docs.appcelerator.com/titanium/3.0/#!/api/Font) object have no reference to this style, but... Why? It's not supported on any of the platforms? Or is it a limitation of Titanium?
how to write Arabic through keypad in titanium android ?
Hi all, I am using Titanium sdk version 2.1.1 and android sdk 2.2, I am trying to write some thing in arabic in text area. I tried it by adding fonts and other many ways but do not show the arabic in phone.Please help if you have any solution to...
How to make an underline text ??
~~~ var label = Titanium.UI.createLabel({ font : { fontWeight : fontWeight, fontSize : fontSize }, color : fontColor, right : right, top : top, textAlign : textAlign, text : items.item(0).text }); ~~~
In TextArea the text is aligned in the same direction, and some in another.
How to make the text TextArea one font, and another part of other or one of the text aligned to the left in one part of the right? P.S.: I use XML for add text in TextArea. ~~~ var name = data.getElementsByTagName("name").item(0).text; ~~~ Thanks!
Text takes ages to load
I have a simple label on screen that is incremented when the user presses a button. The number on the label takes ages to update if it is displaying a number that has not been displayed before, however if it is changing to a number that has been displayed...
Border or Outline for Font, is it possible?
titanium mobile sdk 2.0 iphone sdk 5.1 Hi, Is there a way to add border and border color in font property? I have searched the Q&A and my friend google but found nothing. thanks.
Label of Text with line-through decoration
How to display text with line-through decoration in a Label ? I will use it to tell user an item is now on discount, so wanna line-through the original price and show the discounted price in normal font. Can it be done by using a single Label instead of...
How to make an italic font ?
Hi - on iOS How can make a italic font? My code: (doesn't works) ~~~ var albumLabel = Ti.UI.createLabel({ font:{fontFamily:'Georgia', fontWeight:'italic'}, top: 12, left: 15, text: 'Select an Album' }); ~~~ Thanks
How to change the fontcolor of a leftNavButton?
Hi, I wonder how to change the fontcolor of a leftNavButton. When I make a Button like this: ~~~ leftnavbutton = Titanium.UI.createButton({ color: "#3c4de2", title: "Test" }); ~~~ And add it as leftNavButton to a Window...
Font size on different platforms
Titanium sdk: 2.1.1 os: mac os platform: android, ios the same font size behaves differently in different platfroms, it seems that the font is bigger than the one on android. on both platforms, i use the 'system' as the unit...
change fontSize on tableview
hello guys, I can't change the size of text on a tableview. how can I do ? this is a code of my tabel: ~~~ var tablewin1 = Titanium.UI.createTableView({ data:[ {title:"row1", hasDetail:true}, {title:"row2 ", hasDetail:true} ...
animating a sequence of a text in a label..
Hi, I want to animate a sequence of some texts in a label. Basically I want to use the animation of the spinning wheel using the Web Symbol font http://www.justbenicestudio.com/studio/websymbols/ the 0 to 7 chars produces the spinning wheel without using...
Font properties work on ios, not on Android ?
Hey, i am trying to style my text - on ios there isn't any problem, but it doesn't work on android... var mainTitle = Titanium.UI.createLabel({ text:pdfFiles[i].title, font: { 'color': '#000', 'fontSize':13, ...
font attribute not working
Any ideas why the font size isn't being changed? http://pastie.org/4378404
Using Different Helvetica Font Types?
Hello, I'm trying to use different Helevetica Font Types i.e. Regular, UltraLight, Light and Condensed Bold but couldn't get it through. I successfully managed to install them using the custom font parameter but when I am trying to define them in the...
Is there a way to make label/textField text auto size to to it's width?
Title says it all, but to be clear... I want to take a label and have the text be sized based on how wide the label is in order to make text fit within any size label. Is there a way to do this?
font sizes and different screen resolution on Android - how to make it fit all screens?
Hi all. A very small but annoying piece of information missing in my knowledge (a bit embarrassing).... I have a problem with font sizes and screen resolutions... How should I write the size of text so that it is the same size regardless of screen...
Bold one word in label
I'm trying to find out if anyone knows how to do this. I will have a sentence in a iPad app giving the user the result. It wil be like... This is a test, you scored 1234.45 more then 857.24. I would like the 2 numbers in that sentence to be bold....
Custom font issues
I am using a custom font. However, I want to use a different weight (ie bold). Setting fontWeight to bold in the font object does not do it. It seems I need the bold version of the same font. I tried adding this bold version of the font but could not...
Line Height, wrapping and text labels. What is the best strategy?
var titleLabel = Ti.UI.createLabel({ text:data.titletxt, font:{fontSize:14,fontFamily:"BorisBlackBloxx"}, color:'#000000', top:34, left:15, height:'auto', width:'auto' }); What is the best way to wrap text and control the space between...