Can you provide option for Editing Text like Bold and Italics and also google fonts

Permalink Browser Info Environment
Hi Emilly,
We have already bought your addon for ExRx.net.

Can you provide option for making watermark text as bold, italics.
And also there is only few number of fonts. Fonts we require are not there.
Can you provide google fonts to select fonts.

thanks
Suraj

Type: Pre-Sale
Status: Resolved
srjahir32
View Replies:
emirii replied on at Permalink Reply
emirii
Hello, please update to current package version 1.0.1, i have included one more font for an example to show you below. Currently the fonts are files on the server add on package. It is possible to extend these fonts to fit your needs, I can show you how. To enable bold or to upload specific font, you must upload the bold font type of that specific font. We must do this manually because of the limitations in GD Library with font use (it will not accept external sources).

1. Upload font you want to server (the fonts MUST be TrueType file format):
"packages\newfangled_nonsense_watermark_n_n\src\Assets\fonts\"

For example if you want to download the Google font "Inconsolata"https://www.google.com/fonts#UsePlace:use/Collection:Inconsolata... in a .zip file (they provide a small link on the font page on the top right corner).
1. Be sure to check if you want the Bold and Regular font weight type.
2. Extract the .zip file somewhere.
3 .You will get two files "Inconsolata-Bold" & "Inconsolata-Regular" if you want bold and regular you will have to upload both fonts to the location above on web server.

2. Once you have file uploaded, you need to modify a few files in PHP to get font to show.
"packages\newfangled_nonsense_watermark_n_n\src\Watermark\Watermark.php"
Line 235 in Watermark.php just need to add your new fonts to the switch statement. Be sure to put it before the 'default' clause or it won't work.
case 'Inconsolata (Regular)':
    $fontType = $_SERVER['DOCUMENT_ROOT'] . DIR_REL . '/' . DIRNAME_PACKAGES . '/' . 'newfangled_nonsense_watermark_n_n/src/Assets/fonts/Inconsolata-Bold.ttf';
break;
case 'Inconsolata (Italic)':
     $fontType = $_SERVER['DOCUMENT_ROOT'] . DIR_REL . '/' . DIRNAME_PACKAGES . '/' . 'newfangled_nonsense_watermark_n_n/src/Assets/fonts/Inconsolata-Regular.ttf';
break;


Now you just have to add your new font to the drop down menu in the options area:
"packages\newfangled_nonsense_watermark_n_n\single_pages\dashboard\watermark_n_n\options.php"
On options.php line 150, add your new font to the drop down array:
echo $form->select('font', array(
    'Arial' => 'Arial',
    'Champagne' => 'Champagne',
    'Lobster' => 'Lobster',
    'Ostrich (Regular)' => 'Ostrich (Regular)',
    'Ostrich (Black)' => 'Ostrich (Black)',
    'Oswald' => 'Oswald',
    'Pacifico' => 'Pacifico',
    'Playfair (Regular)' => 'Playfair (Regular)',
    'Playfair (Italic)' => 'Playfair (Italic)',
    'Tahoma' => 'Tahoma',
    'Inconsolata (Italic)' => 'Inconsolata (Italic)',
    'Inconsolata (Bold)' => 'Inconsolata (Bold)'
), $font);


When you upload the changes, you should be good. Go to options, select Watermark Font, and select your new font. It should come up if everything went smoothly.

If you need help with implementing this solution or you have a set of fonts you would like to use in mind, send me the font names from google fonts (or where i can download the TTF file) and I can add them to the add-on for you if you'd like.

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.5.6
Version Installed - 5.7.5.6
Database Version - 20151221000000

# concrete5 Packages
Add and Remove Classes and IDs (0.9.5), Fruitful (1.2), Honest Websites Back To Top (0.9.4), HTML5 Audio Player Basic (2.0.5), Responsive Embed (1.0.0), Share Me (0.9.1), Spacer (0.9.3), Thumbnail Generator (0.9.0.3), Touch Gallery (2.1), WatermarkNN (1.0.0).

# concrete5 Overrides
blocks/image/view.php, blocks/image, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, src/Retina/RetinaImage.php, src/Retina/RetinaPicture.php, src/Retina, blocks/image/view.php, blocks/image, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, src/Retina/RetinaImage.php, src/Retina/RetinaPicture.php, src/Retina

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_fcgid/2.3.9

# Server API
cgi-fcgi

# PHP Version
5.4.42

# PHP Extensions
apc, bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mcrypt, memcache, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, timezonedb, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib.

# PHP Settings
max_execution_time - 120
apc.max_file_size - 1M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 256M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 12M
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.