diff --git a/fontexist.m b/fontexist.m index e6647eb..94b8029 100644 --- a/fontexist.m +++ b/fontexist.m @@ -5,9 +5,9 @@ % Created 2016-01-05 by Jorg C. Woehl % 2016-12-16 (JCW): Converted to standalone function, comments added. -% input: empty character array, or nonempty character vector +% input: empty character array, or character vector assert(ischar(font) && (isrow(font) || isempty(font)),... - 'fontexist:IncorrectInputType', 'Input must be an empty character array or a nonempty character vector.'); + 'fontexist:IncorrectInputType', 'Input must be an empty character array or a character vector.'); if isempty(font) % reduce to simplest empty type font = ''; @@ -16,4 +16,4 @@ idx = find(strcmpi(listfonts, font), 1); bool = ~isempty(idx); -end \ No newline at end of file +end diff --git a/getOSfont.m b/getOSfont.m index 2d1d43d..303eb51 100644 --- a/getOSfont.m +++ b/getOSfont.m @@ -46,20 +46,20 @@ %% Input argument validation -% input 1: empty character array, or nonempty character vector +% input 1: empty character array, or character vector assert(ischar(OS) && (isrow(OS) || isempty(OS)), 'getOSfont:IncorrectInputType',... - 'Input 1 must be an empty character array or a nonempty character vector.'); + 'Input 1 must be an empty character array or a character vector.'); % convert to all lowercase if necessary OS = lower(OS); if isempty(OS) % reduce to simplest empty type OS = ''; else - % input 2: (nonempty) numeric vector containing finite real non-negative "integers" - assert(isnumeric(OSVersion) && isvector(OSVersion) && all(isfinite(OSVersion))... + % input 2: nonempty numeric vector containing finite real non-negative "integers" + assert(isnumeric(OSVersion) && ~isempty(OSVersion) && isvector(OSVersion) && all(isfinite(OSVersion))... && isreal(OSVersion) && all(OSVersion == round(OSVersion)) && all(OSVersion >= 0),... 'getOSfont:IncorrectInputType',... - 'Input 2 must be a (nonempty) vector containing finite real non-negative integer values (of any numeric type).'); + 'Input 2 must be a nonempty vector containing finite real non-negative integer values (of any numeric type).'); end %% Determine system UI font @@ -161,4 +161,4 @@ OSFont = ''; end -end \ No newline at end of file +end