You've already forked lazarus-ccr
Support for Mac font substitutions in form files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1435 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -133,16 +133,20 @@ THTMLViewer=
|
||||
; http://dustinbrewer.com/popular-fonts-with-their-mac-osx-windows-and-linux-equivalents/
|
||||
; http://mondaybynoon.com/2007/04/02/linux-font-equivalents-to-popular-web-typefaces/
|
||||
|
||||
; Note that if you're targeting a specific platform, you can use this to
|
||||
; substitute normal fonts for that platform, for example if targeting Mac:
|
||||
; Arial=Lucida Grande
|
||||
|
||||
[FontSubstitutes]
|
||||
MS Sans Serif=Arial
|
||||
MS Serif=Times New Roman
|
||||
System=Arial
|
||||
|
||||
|
||||
; With both the -s and -m switches, substitute these fonts first
|
||||
; before any fonts listed under [FontSubstitutes].
|
||||
|
||||
[MacFontSubstitutes]
|
||||
Arial=Lucida Grande
|
||||
;Arial=Helvetica
|
||||
|
||||
|
||||
; These controls cannot receive focus on Mac, so with -m switch
|
||||
; add TabStop = False so tabbing skips over them.
|
||||
|
||||
@ -152,5 +156,5 @@ TBitBtn=
|
||||
TComboBox=
|
||||
TCheckBox=
|
||||
TRadioGroup=
|
||||
;TListBox=
|
||||
|
||||
TListBox=
|
||||
TPageControl=
|
||||
|
@ -310,10 +310,16 @@ begin
|
||||
begin
|
||||
StripStr := Copy(InStr, Pos('=', InStr)+3, MaxInt); {Name after quote}
|
||||
Delete(StripStr, Length(StripStr), 1); {Delete closing quote}
|
||||
if CfgFileObj.ValueExists('FontSubstitutes', StripStr) then
|
||||
if MacSwitch and
|
||||
CfgFileObj.ValueExists('MacFontSubstitutes', StripStr) then
|
||||
WriteLn(LfmFileVar,
|
||||
Copy(InStr, 1, Succ(Pos('=', InStr))), '''',
|
||||
CfgFileObj.ReadString('FontSubstitutes', StripStr, 'Arial'),
|
||||
CfgFileObj.ReadString('MacFontSubstitutes', StripStr, ''),
|
||||
'''')
|
||||
else if CfgFileObj.ValueExists('FontSubstitutes', StripStr) then
|
||||
WriteLn(LfmFileVar,
|
||||
Copy(InStr, 1, Succ(Pos('=', InStr))), '''',
|
||||
CfgFileObj.ReadString('FontSubstitutes', StripStr, ''),
|
||||
'''')
|
||||
else
|
||||
WriteLn(LfmFileVar, InStr);
|
||||
|
Reference in New Issue
Block a user