Trying to Bold Helvetica in a string, please help
Here's whats being populated, And its in the document level javascript.
// Place all prepopulation data into a single data structure
var Carddata = { Jarl:{ AP: "3",
SP: "5",
MA: "3",
RA: "2",
DF: "3",
RS: "1",
DR: "3",
MN: "2",
HP: "3",
Size: "2",
UnitRank: "War Clan Leader",
Base: "30mm",
Glorycost: "160",
Specialabilities: "Combat Sense, Tactician (12), Teamwork, Hip Shot, Weapon Master",
SpecialAB: "Combat Sense: Enemies cannot deploy models that have the Special Ability Stealth within 18 of this model \nTactician: This model can cause one other friendly model within range who has not yet activated this Round to immediately activate following this models activation \nTeamwork: Models with the Special Ability Teamwork gain an additional +1 MA and +1 ST when they gain the Overwhelm bonus \nHip-Shot: This model may use this RA for a Clash action. They can initiate a Clash the moment an enemy model enters LOS and is within Attack range \nWeapon Master: This model may re-roll one failed MA attempt per activation"},
function SetFieldValues(cUnitType)
{
this.getField("AP").value = Carddata[cUnitType].AP;
this.getField("SP").value = Carddata[cUnitType].SP;
this.getField("MA").value = Carddata[cUnitType].MA;
this.getField("RA").value = Carddata[cUnitType].RA;
this.getField("DF").value = Carddata[cUnitType].DF;
this.getField("RS").value = Carddata[cUnitType].RS;
this.getField("DR").value = Carddata[cUnitType].DR;
this.getField("MN").value = Carddata[cUnitType].MN;
this.getField("HP").value = Carddata[cUnitType].HP;
this.getField("Size").value = Carddata[cUnitType].Size;
this.getField("UnitRank").value = Carddata[cUnitType].UnitRank;
this.getField("Base").value = Carddata[cUnitType].Base;
this.getField("Glorycost").value = Carddata[cUnitType].Glorycost;
this.getField("Specialabilities").value = Carddata[cUnitType].Specialabilities;
this.getField("SpecialAB").value = Carddata[cUnitType].SpecialAB;
}
Here's what I was trying to piece together to make parts of a string bold
var one = this.getField("SpecialAB").valueAsString;
var spans = [];
var span1 = {};
span1.textFont = font.HelvB;
span1.text = "Combat Sense:";
spans.push(span1);
var span2 = {};
span2.text = " Enemies cannot deploy models that have the Special Ability Stealth within 18 of this model" ;
spans.push(span2);
event.richValue = spans;
So,
1. I'm not sure where to put this, Document level javascript, or in the Field custom format script.
2. Very new at this, and I've been cobbling bits and pieces from all over learning as I go
3. Please help?
My end goal is to have all the "Special Abilities" names followed by the semicolon bolded in the "SpecialAB" field.
I have them returning to their own lines, but its not enough separation, and bold would stand out more.
