|
| 1 | +--- |
| 2 | +title: "Tutorial: Changing the GSAS-II Font Size" |
| 3 | +--- |
| 4 | +<!--- Don't change the HTML version of this file; edit the .md version --> |
| 5 | + |
| 6 | +[//1]: <> (Comment: This is an attempt to create a Tutorial in Markdown.) |
| 7 | + |
| 8 | +## Intro |
| 9 | + |
| 10 | +GSAS-II has customizable settings which are called preference |
| 11 | +settings. These are found in a menu command, as described below and |
| 12 | +are saved with other GSAS-II settings. As of January 3, |
| 13 | +2025 (in version #5802) a new feature was added that allows the |
| 14 | +GSAS-II font size to be changed via these settings. The font size will |
| 15 | +also be determined by settings on the local computer, so this size is |
| 16 | +relative to the the local OS settings. |
| 17 | +Not all parts of the GUI will be affected by this setting. Note that |
| 18 | +some of the modal windows (these are windows used to get |
| 19 | +input such as file names) that GSAS-II opens are created by your |
| 20 | +operating system and thus will have font sizes determined by system |
| 21 | +settings. Others may need changes to utilize this setting. |
| 22 | +If your use of GSAS-II is impared by this font setting not being |
| 23 | +applied to a section of GSAS-II please open a |
| 24 | +[GitHub |
| 25 | +ticket](https://github.com/AdvancedPhotonSource/GSAS-II/issues) |
| 26 | +and provide an example of what could be improved. |
| 27 | + |
| 28 | +The font size setting is applied when GSAS-II is started, so changing it requires |
| 29 | +restarting GSAS-II before the effect of this setting is seen. |
| 30 | + |
| 31 | +## 1. Finding the preferences settings |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +The font setting is determined by preference variable `FontSize_incr` and this is set inside the File menu (File->Preferences). On MacOS, preference settings are also found in the usual App menu (labeled GSAS-II or python, depending on how the GSAS-II GUI is started), as shown here. |
| 36 | + |
| 37 | +## 2. Change the font preference value |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +When the Preferences menu is selected a window is opened where any of |
| 42 | +the preference variables can be selected. Select from the pull-down |
| 43 | +list the variable `FontSize_incr` as shown here. |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + This will open a window where the value can be set for the font |
| 48 | + size. Note that a value of 0 (the default) provides the |
| 49 | + system-default size for the font. A positive value provides a larger |
| 50 | + font and a negative value provides a smaller font. Only integer |
| 51 | + values can be used. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +As noted before, the value set for `FontSize_incr` is applied only |
| 56 | +when the GSAS-II application is started, so when the "Save current |
| 57 | +settings" button is pressed, a window is displayed asking if GSAS-II |
| 58 | +should be restarted so that the change can take effect. It is fine to |
| 59 | +choose "No" here; the change will take effect the next time that |
| 60 | +GSAS-II is started. If "Yes" is selected, you will get the chance to |
| 61 | +save the current GSAS-II project. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +When "Yes" is above, the window here is shown to ask if you want to |
| 66 | +save any changes made to the current GSAS-II project file. |
| 67 | + |
| 68 | +- If "Cancel" is chosen, GSAS-II will not restart (but the change to the font size |
| 69 | + will be saved). |
| 70 | +- If "No" is selected, GSAS-II will end; any changes made since the |
| 71 | + file was last saved will be lost. GSAS-II will then restart without |
| 72 | + reading a .gpx file. |
| 73 | +- If "Yes" is selected the current .gpx file will be overwritten with |
| 74 | + the current project contents (if the project has never been saved, |
| 75 | + you will be asked for a location and name for the .gpx file. GSAS-II |
| 76 | + will then restart with the saved version of the project loaded. |
| 77 | + |
| 78 | +## 3. Example with the changed font size |
| 79 | + |
| 80 | +Below are two examples of GSAS-II with two different font size |
| 81 | +settings. |
| 82 | + |
| 83 | +| `FontSize_incr` | Example | |
| 84 | +| :---: | ------------------------------------- | |
| 85 | +| 0 |  | |
| 86 | +| 3 |  | |
| 87 | + |
| 88 | +Note that not all text (for example the status message at the bottom |
| 89 | +of the window) has the font size changed. |
| 90 | + |
| 91 | +---- |
| 92 | +| | |
| 93 | +| ---: | |
| 94 | +| Brian Toby | |
| 95 | +| January 10, 2025 | |
0 commit comments