| 4899 | } |
| 4900 | |
| 4901 | int PSL_setfontdims (struct PSL_CTRL *PSL, double supsub, double scaps, double sup_lc, double sup_uc, double sdown) { |
| 4902 | /* Adjust settings of sub/super/small caps attributes */ |
| 4903 | if (supsub <= 0.0 || supsub >= 1.0) { |
| 4904 | PSL_message (PSL, PSL_MSG_ERROR, "Warning: Size of sub/super-script (%g) exceed allowable range, reset to %^g\n", supsub, PSL_SUBSUP_SIZE); |
| 4905 | supsub = PSL_SUBSUP_SIZE; |
| 4906 | } |
| 4907 | if (scaps <= 0.0 || scaps >= 1.0) { |
| 4908 | PSL_message (PSL, PSL_MSG_ERROR, "Warning: Size of small caps text (%g) exceed allowable range, reset to %^g\n", scaps, PSL_SCAPS_SIZE); |
| 4909 | scaps = PSL_SUBSUP_SIZE; |
| 4910 | } |
| 4911 | if (sup_lc <= 0.0 || sup_lc >= 1.0) { |
| 4912 | PSL_message (PSL, PSL_MSG_ERROR, "Warning: Amount of baseline shift for lower-case super-scripts (%g) exceed allowable range, reset to %^g\n", |
| 4913 | sup_lc, PSL_SUP_UP_LC); |
| 4914 | sup_lc = PSL_SUBSUP_SIZE; |
| 4915 | } |
| 4916 | if (sup_uc <= 0.0 || sup_uc >= 1.0) { |
| 4917 | PSL_message (PSL, PSL_MSG_ERROR, "Warning: Amount of baseline shift for upper-case super-scripts (%g) exceed allowable range, reset to %^g\n", |
| 4918 | sup_uc, PSL_SUP_UP_UC); |
| 4919 | sup_uc = PSL_SUBSUP_SIZE; |
| 4920 | } |
| 4921 | if (sdown <= 0.0 || sdown >= 1.0) { |
| 4922 | PSL_message (PSL, PSL_MSG_ERROR, "Warning: Amount of baseline shift for sub-scripts (%g) exceed allowable range, reset to %^g\n", |
| 4923 | sdown, PSL_SUB_DOWN); |
| 4924 | sdown = PSL_SUBSUP_SIZE; |
| 4925 | } |
| 4926 | PSL->current.subsupsize = supsub; |
| 4927 | PSL->current.scapssize = scaps; |
| 4928 | PSL->current.sub_down = sdown; |
| 4929 | PSL->current.sup_up[PSL_LC] = sup_lc; |
| 4930 | PSL->current.sup_up[PSL_UC] = sup_uc; |
| 4931 | |
| 4932 | return (PSL_NO_ERROR); |
| 4933 | } |
| 4934 | |
| 4935 | int PSL_setformat (struct PSL_CTRL *PSL, int n_decimals) { |
| 4936 | /* Sets number of decimals used for rgb/gray specifications [3] */ |
no test coverage detected