Fastest way to change fonts globably
Posted: Fri Nov 05, 2021 11:54 pm
Is there a fast way to change an entire text style fontname and then it is applied globably to a RichViewEdit?
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://richedit.com/forums/
Code: Select all
procedure FontReplace;
var
i:Integer;
RVEStyle: TRVStyle;
begin
//We are going to try to replace RichViewEdit font and we are aiming for speed.
RVEStyle := RichViewEdit.Style;
for i := 0 to RVEStyle.TextStyles.Count-1 do
begin
if String(RVEStyle.TextStyles[i].FontName) = String('Replacement FontVariable goes here - use defaults, Segoe UI, Gentium, Cardo unless set in the module') then
RVEStyle.TextStyles[i].FontName := ' FontPref variable from theWord goes here ';
end;
RichViewEdit.Format;
end;