Typeface
The typeface is the name of the font you want to use, such as Arial, Arial Black, Times, or Palatino. The interview scripting language calls the typeface the font family.
There are many different font families available, but since the font must exist on the respondent’s computer, it is probably best to stick to common fonts such as Arial or Times. Alternatively, provide one of these as an alternative that can be used if the respondent’s computer does not have the main font you have chosen. (If you are using Internet Explorer you can find out the names of the fonts available with your browser by selecting Tools > Internet Options and then clicking the Font button on the General tab.)
In the metadata section
To specify the font family for an information, question, or categorical response text, include the following element as part of the question or response definition:
labelstyle(font(family = "name1[,name2, ...namen]"))
where:
▪name1 to namen are font family names. Names containing spaces must be enclosed in single quotation marks.
When you name more than one family, the interviewing program passes them to the respondent’s browser in the order they appear in the scrip. The browser reads the names from left to right, and stops when it finds a font that exists. So, for example, if you want to display the Sports question text in either Palatino Linotype, Garamond, or Times New Roman, you would type:
Sports4 "Which of the following sports do you play?"
labelstyle(font(family = "'Palatino Linotype', Garamond, 'Times New Roman'"))
categorical [1..]
{Tennis, Football, Cricket, Basketball, Hockey};
If the browser supports Palatino Linotype, it will display this question as:
In the routing section
To set the font family in the routing section of the script, type:
ObjectName.Label.Style.Font.Family = "name1[, name2, ... namen]"
where:
▪ObjectName is the object name of a question, category (response), or information item.
▪name1 to namen are font family names. Names containing spaces must be enclosed in single quotation marks.
To produce the previous illustration you could type:
Sports.Label.Style.Font.Family = _
"'Palatino Linotype', Garamond, 'Times New Roman'"
For categorical responses, this refers to the response control as a whole. An alternative that refers just to the categorical response texts is:
Sports.Categories[..].Label.Style.Font.Family = _
"'Palatino Linotype', Garamond, 'Times New Roman'"
See also