Updated the build system so that you must do a cvs checkout of the
'Fonts' module inside the 'Jskad' module. I.e., you must now have the tree like so: Jskad/ source/ dist/ Fonts/ TibetanMachineWeb/ . . . This is because the THDL tools now optionally (and by default) load the TibetanMachineWeb fonts automatically. Updated the build system so that the 'web-start-releases' and 'self-contained-dist' targets JAR up optional JARs to create double-clickable, self-contained joy. Even the TMW fonts are in the JARs now. Changed the strings describing two Jskad keyboards so that "keyboard" is no longer in the description. It's in the label next to the combo box. Jskad now saves preferences on exit or when the user selects a menu item (that is there for debugging mainly) to ~/my_thdl_preferences.txt on *nix or C:\my_thdl_preferences.txt on Win32. I don't know the correct Mac location. There's a new paradigm for telling org.thdl.util.ThdlOptions that a user preference has been changed. If, for example, a combo box is manipulated so that the ACIP keyboard is selected, then you must call a certain method in ThdlOptions.
This commit is contained in:
parent
77b8c5e424
commit
d200b03d66
12 changed files with 529 additions and 93 deletions
|
@ -495,6 +495,20 @@ public class DuffPane extends TibetanPane implements KeyListener, FocusListener
|
|||
getTibDoc().setTibetanFontSize(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like {@link #setTibetanFontSize(int)}, but should be called only
|
||||
* when the user has somewhat explicitly chosen the font size.
|
||||
* This will set the font size but also record this as a user
|
||||
* preference. Then you can choose to save the user preferences
|
||||
* via {@link org.thdl.util.ThdlOptions.saveUserPreferences()}.
|
||||
*
|
||||
* @param size a point size
|
||||
*/
|
||||
public void setByUserTibetanFontSize(int size) {
|
||||
ThdlOptions.setUserPreference("thdl.default.tibetan.font.size", size);
|
||||
setTibetanFontSize(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current point size for Tibetan text.
|
||||
* @return the current default font size for Tibetan
|
||||
|
@ -517,6 +531,15 @@ public class DuffPane extends TibetanPane implements KeyListener, FocusListener
|
|||
StyleConstants.setFontSize(romanAttributeSet, size);
|
||||
}
|
||||
|
||||
/** Like {@link #setRomanAttributeSet}, but allows for noting the
|
||||
* (explicit or implicit) choice in the user's preferences
|
||||
* file. */
|
||||
public void setByUserRomanAttributeSet(String font, int size) {
|
||||
ThdlOptions.setUserPreference("thdl.default.roman.font.face", font);
|
||||
ThdlOptions.setUserPreference("thdl.default.roman.font.size", size);
|
||||
setRomanAttributeSet(font, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current point size for non-Tibetan text.
|
||||
* @return the current default font size for non-Tibetan
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue