[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] GSoC-2020-anuj d05b7fb: [ftsdf] Add better usage secti
From: |
Anuj Verma |
Subject: |
[freetype2-demos] GSoC-2020-anuj d05b7fb: [ftsdf] Add better usage section. |
Date: |
Mon, 24 Aug 2020 09:43:18 -0400 (EDT) |
branch: GSoC-2020-anuj
commit d05b7fb6c2582f2ee84716a39a3a4651e1e49c5a
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
[ftsdf] Add better usage section.
* src/ftsdf.c (print_usage): Print detailed usage information.
---
src/ftsdf.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/ftsdf.c b/src/ftsdf.c
index be2f38f..1163ae4 100644
--- a/src/ftsdf.c
+++ b/src/ftsdf.c
@@ -571,16 +571,32 @@
return FT_Err_Ok;
}
+ static void
+ print_usage( char* exec_name )
+ {
+ printf( "\nftsdf: Signed Distance Field Viewer\n" );
+ printf( "-----------------------------------\n\n" );
+ printf( "Usage: %s pt font\n\n", exec_name );
+ printf( " pt The point size for the given resolution.\n" );
+ printf( " If the resolution is 72dpi, this directly gives the\n" );
+ printf( " ppem value (pixels per EM). This gives the size of the\n"
);
+ printf( " glyph from which SDF will be generated.\n" );
+ printf( " font The font file to use for generating SDF.\n" );
+ }
+
int
main( int argc,
char** argv )
{
FT_Error err = FT_Err_Ok;
+ char* exec_name = NULL;
+
+ exec_name = ft_basename( argv[0] );
if ( argc != 3 )
{
- printf( "Usage: [ptsize] [font file]\n" );
+ print_usage( exec_name );
exit( -1 );
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] GSoC-2020-anuj d05b7fb: [ftsdf] Add better usage section.,
Anuj Verma <=