WPCubed Product Support

default font for WPSymbolDlg

Is it possible to set this?

Customer complained hers is using WingDings. Mine uses Georgia.

I tried: WPSymbolDlg1.FontName:='Arial';

Did not seem to have any effect.

#1 ♥ 0
3.8k Views 2 users read 1 min
support

Hi,

The font is selected ion the activate event:

procedure TWPSymbolDialog.FormActivate(Sender: TObject);
var
 i: Integer;
 s: TFontName;
begin
 if fsEditBox = nil then
  s := FFontName
 else
 begin
  if not fsEditBox.WritingAttr.GetFontName(s) or (s='') then s :=FFontName
 end;
 for I := 0 to cbxFontList.Items.Count do
  if CompareText(cbxFontList.Items.Strings[i], s) = 0 then
  begin
   cbxFontList.ItemIndex := I;
   Break;
  end;

 CharacterGrid.Font.Name := s;
 CharacterGrid.Font.CharSet := DEFAULT_CHARSET; // aCharset;
 cbxFontListChange(Sender);
end;

You can modify the line

if (fsEditBox = nil) or (FFontName<>'') then

to always use the property FontName.

Julian

#2 ♥ 0
This category is archived. No new posts are possible.