When I create a new document it starts with the them "Basic (Simple)" is there a way to specify the them like "Black & White (Classic)"
Just use Word to create an empty document using the theme you want (along with any other customizations like specific styles and so forth) and use that as the starting point when you open a document with python-docx:
document = Document("my-black-and-white-template.docx")
All python-docx is doing when you don't specify a document to open is using an internal default document, which is the Basic (Simple) theme you mention; it is whatever was the default style for a new document in a fresh Word installation at the time that part of the python-docx library was written. It's that way for convenience in getting started and when you don't really care too much about the theme.
Here is the font that I want to use https://www.google.com/get/noto/#/family/noto-sans
I don't want to download this and use. I want to use it directly from google webfonts.
But when I try to use it from this page https://www.google.com/fonts#UsePlace:use/Collection:Noto+Sans getting issue in utf characters. In fact on first link I can see language between available languages.
This is example of first link on my language:
And here is what I get when I use it from second link (web fonts):
http://cdn.joxi.ru/uploads/prod/2014/08/10/c13/5d9/24da6d7596f2129a32dda1c561e7545b2fdafe9c.jpg
As you see the character ə looks different in results. How to get Noto Sans for specific language from google webfonts?
When you visit https://www.google.com/fonts#UsePlace:use/Collection:Noto+Sans, go to the second step and select the character sets that you want to include for your language.
This always returns 0 even though the PDF has several embedded fonts.
Im using TET4.1 PHP 5.3 Linux
$fontCount = (integer) $tet->pcos_get_number($doc, "length:fonts");
All other calls using $tet->pcos_get_number($doc, "xxxx") work fine.
without knowing details I can only guess:
the document contain the fonts only within form fields
no fonts are used and the visual text comes from raster images
I guess in this case, it might be good recommendation to contact the vendor directly.
http://www.pdflib.com/licensing-support/opening-a-support-case/
In the noble effort to re-invent every wheel, our company has recently rolled our own custom web-based e-mail app, of which I was the primary designer.
One thing I've noticed is that smileys coming in from MS Outlook-based e-mails (sent from third parties) are not appearing correctly. Example: A happy face just displays a J
The HTML of the inbound message comes in like this:
<span style="...;font-family:Wingdings;...">J</span>
I know that Firefox and Chrome do not support the Wingdings font because it is non-standard. However, I am tasked with coming up with a fix.
Is there a good way to either 1) force the browser to load and use Wingdings or 2) otherwise convert the J to a smiley?
I'd rather not do anything crazy like try some wingdings-detection-regex - or even worse, parse the DOM - just to get some stupid emoticons working. Maybe there is already some library out there that already handles this?
For what it's worth, GMail seems to not 'fix' this problem either. iOS doesn't in the message view, but puzzlingly does fix it in the inbox view (replaces the J w/ emoji)
EDIT
To clarify, this question is regarding inbound messages from third parties. Outlook, by default, autocorrects ":)" to the Wingdings smiley. There's nothing I can do to prevent this coming in. What I need is a solution to correct for this.
EDIT 2
Again, the app itself is a web based e-mail client (Gmail, etc.). E-mails go in to here, NOT to users' individual Outlook/phones/other e-mail clients. It only goes into the web app.
To avoid having to parse the HTML or manipulating the DOM, a simple solution would be to use CSS3 web fonts by linking the Wingdings font-family to a copy of the Wingdings font file on your server:
<style>
#font-face {
font-family: Wingdings;
src: url(link_to_wingdings_font_file.ttf);
}
</style>
However, a license is required for this approach.
You could embed the SWEC (Symbola-based Wingdings Emoticons Compatibility) font: https://drive.google.com/open?id=0BwDrnPQfa-aMOEx0bEZCQUNrSGs
It provides basic compatibility with Wingdings emoticons. (In Wingdings, "J" represents a smile, "K" represents a lack of expression, and "L" represents a frown.) Background: certain versions of Microsoft e-mail clients still in use change user-typed expressions such as ":)", ":|", and ":(" into "J", "K", and "L", respectively, and then specify Wingdings as the font family; recipients on systems which do not include a Wingdings-compatible font are not able to see the intended emoticons, which can cause confusion.
You need to manually substitute it prior to sending the email as you have no control over what fonts the reader has installed. You also can't include anything outside bland old html and css (unless you want to mess with VML)
First I would try running your wingding through a html converter to see if there is a html code for it.
Besides that, you could try a webfont wingdings equivalent, however there are issues with Outlook playing nice when webfonts are imported in email (ignores your font stack, falling back to Times New Roman).
Besides that, all that is left is ZephyrusDigital's suggestions of using an image or :).
Against my better judgement I have decided to go for the quick hack and just use a regular expression. Here it is for anyone else that runs into the same problem:
$html = preg_replace('/\<SPAN*?(Wingdings)*?[^\>]*\>J(\<o\:p\>\<\/o\:p\>)*\<\/SPAN\>/i', ' :) ', $html);
use :)
kidding!
why not save the wingdings smiley in photoshop as a png, or make another custom one? you could use <img src="http://something.com/images/smiley.png" style="display:inline-block;"/> and it won't look weird in a text block as long as it isn't taller than your line-height.
I'm using a fully licensed version of Idea.
I just created a custom file type for *.jade files. Generally, I use a 4-space tab-size, but for *.jade files, I want to use a 2-space size.
That's it. I don't want a work around. I want to be able to set a specific tab size for only *.jade files.
http://www.jetbrains.com/idea/features/code_style.html
says: "...tab and indent size can be specified per file type."
It's not possible to specify indent settings separately for custom file types right now. Such functionality is provided by the language specific plug-ins (even some language plug-ins do not allow to set custom indents and use settings from the General tab).
There is already a feature request submitted 7 years ago and with zero votes. Feel free to vote.