Temp Installer Font

1 view
Skip to first unread message

Brigitta Martini

unread,
Aug 4, 2024, 7:26:08 PM8/4/24
to elannikve
Anapplication can use a font to draw text only if that font is either resident on a specified device or installed in the system font table. The font table is an internal array that identifies all nondevice fonts that are available to an application. An application can retrieve the names of fonts currently installed on a device or stored in the internal font table by calling the EnumFontFamilies or ChooseFont functions.

To temporarily install a font, call AddFontResource or AddFontResourceEx. These functions load a font that is stored in a font-resource file. However, this is a temporary installation because after a reboot the font will not be present.


A font installed from a location other than the %windir%\fonts folder cannot be modified when loaded in any active session, including session 0. Any attempt to change, replace, or delete will, therefore, be blocked. If modification to a font is necessary:


Whenever an application calls the functions that add and delete font resources, it should also call the SendMessage function and send a WM_FONTCHANGE message to all top-level windows in the system. This message notifies other applications that the internal font table has been altered by an application that added or removed a font.


The following are some pointers on how to solve common issues with IguanaTex.



Error messages

Other bugs

How do I...

System requirements

Error messagesQ: When trying to add IguanaTex to my add-ins, I get the error message: IguanaTex_v1_XX isn't a valid add-in.


A: This problem occurs when the download failed, which you can confirm by checking that the size of the downloaded file is 0 kB. I suggest downloading the password-protected .zip file, which usually is not stopped by firewalls, or asking your IT department to whitelist IguanaTeX.


A: This problem occurs when IguanaTex is unable to locate LaTeX in order to compile your Latex file. To verify that this is indeed the problem, click on Start, then on Run, then type cmd and press Enter. In the new window type latex and press Enter. You should see the Latex command prompt. If instead you receive an error message such as 'latex' is not recognized as an internal or external command, then there is a problem with your installation of LaTeX. Verify that you have LaTeX installed and that the version you are using is still supported by its developers. Reinstalling the latest version if necessary should resolve most problems. On Windows, the most common LaTeX installations are MikTex and TeX Live.


A: This problem is usually caused when the program dvipng, or other MikTex/TexLive components, are not installed correctly. dvipng is usually installed with MikTex/TexLive, but some 'minimal' or 'custom' MikTex/TexLive installation options do not include it. To verify that this is the problem, generate the above error message and then check the contents of the temporary directory which you specified when installing IguanaTex. If dvipng or some of its component packages are missing, you will see a tex file containing your LaTeX code, and a dvi file, but no png file.


A: This may be due to missing LaTeX packages. Some users have been able to install the missing packages by clicking on the Debug checkbox in the IguanaTex window. This then allowed MikTex/TexLive to pop-up the install window and install any missing software.


A: Windows 7 has enhanced security measures which limit the ability of programs to write to some directories on the hard disk. IguanaTex uses a directory to store temporary files, which is set to c:\temp by default. Make sure that this directory exists, and that you are allowed to write to it (for example, by creating a text file in this directory). If the directory does not exist, you can simply create it. If the directory exists but you cannot create text files there, or if you receive a confirmation message from Windows when you attempt to create a text file in that directory, you can set a different temp directory by clicking "Set Temp folder" in the IguanaTex tab and putting the path to the folder of your choice.


A: The environment variable %USERPROFILE% does not play nice with the API function that creates external processes from VBA. The simplest solution is to go to "Main Settings" and expand the paths containing %USERPROFILE% to the corresponding full path, e.g., by clicking on the "..." button next to each path and navigating to the proper location, or by replacing %USERPROFILE% with "C:\Users\your-user-name".


If this error occurs in Windows 7, it may also be a result of your operating system's security measures. Windows 7 has enhanced security measures which limit the ability of programs to write to some directories on the hard disk. IguanaTex uses a directory to store temporary files, which is set to c:\temp by default. Make sure that this directory exists, and that you are allowed to write to it (for example, by creating a text file in this directory). If the directory does not exist, you can simply create it. If the directory exists but you cannot create text files there, or if you receive a confirmation message from Windows when you attempt to create a text file in that directory, you can set a different temp directory by clicking "Set Temp folder" in the IguanaTex tab and putting the path to the folder of your choice.


I know. This seems to only happen on some machines (my laptop is one, if that's any consolation), for an unknown reason, and this somehow does not trigger PowerPoint's debugger , so I don't know where this comes from. Everything seems normal after just clicking "OK".Q: When launching PowerPoint, or when trying to use IguanaTex, I get a "Run-time error '2185': Could not get the LineCount property." error (PowerPoint 2010).


I know. For some reason Powerpoint seems to fail correctly initializing IguanaTex on some machines (my laptop is one, if that's any consolation). I spent a ridiculous amount of time trying to fix this issue, without success. The only workaround is to click "End", "OK", then go to the "Developper" tab (or to "File" then "Options"), click "Add-ins", and un-check then re-check IguanaTex to force PowerPoint to reload it. Yes, I have to do this every time I launch PowerPoint 2010 on my laptop.Q: IguanaTex prevents Powerpoint from starting, displaying "Microsoft PowerPoint has stopped working".


This may be caused by Kaspersky Internet Security. It has been reported to prevent AddIns from running. The only workaround at this point is to uninstall Kaspersky.

If you are having a similar issue but do not have Kaspersky installed, please let me know.


Some users have reported issues right after installing ImageMagick on their system. Please try to restart Powerpoint, then if it still does not work, restart your computer. If this does not work, try reinstalling ImageMagick and make sure that you check the box to "Install development headers and libraries for C and C++" or in recent versions to "Install legacy utilities (e.g. convert)".


You may be lacking some font on your system. Try running with "Debug" checked; if, at the dvipng step, there is a prompt to install some fonts, follow the instructions to install the fonts, and you should be all set from there on.


This is probably a security issue with Windows/PowerPoint, due to the add-in not being trusted. I suggest downloading the .pptm version, and using "save as" to make you own .ppam version. That .ppam file should be trusted, because you made it.


A: In v1.34, we fixed an issue to handle an inconsistency in the way PowerPoint inserts images into slides. As a consequence, there is now a discrepancy between v1.34 and older versions in terms of what IguanaTex considers the reference dimensions. Fortunately, this will only happen once per display, and it should hopefully not happen again when upgrading to later versions. We apologize for the inconvenience.

In v1.50, we fixed another issue to handle an inconsistency in the way IguanaTex dealt with displays on high-dpi screens, which resulted in wrong rescaling when editing displays on machines with various DPI settings. This will only happen once per display if your display was created on a machine with a DPI other than 96.


A: The point size setting is basically a rescaling factor applied to the generated PNG file, that is intended to make the font size of text/maths written in "regular" LaTeX match that of Powerpoint. It assumes that LaTeX's default font size of 10 points is used. If you want to have a match between Powerpoint's font size and that generated by IguanaTex, you need to make sure that you are using 10 point fonts in your LaTeX code (and of course use the same font in Powerpoint and LaTeX), or change IguanaTex's point size accordingly.


A: Scaling for Vector graphics display can be problematic. As a workaround, starting with v1.56, converting from Bitmap to Vector will preserve the size of the display, which is good because Bitmap scaling is pretty reliable. Bitmap generation is also much faster than Vector. I thus suggest first generating a display as Bitmap, and when it's been finalized, do one last conversion from Bitmap to Vector.

While you should not need it anymore, note that there is also a manual rescaling factor in "Main Settings" so that you can tune the size once and for all for your machine, when generating a Vector display form scratch. One way to use it is to create a Bitmap display and a Vector display with the same content, and find the correct ratio to apply to the Vector one to match the Bitmap one. You can also try comparing with normal text in a PowerPoint Text Box, making sure to use the same font (e.g., Times New Roman, or ideally Computer Modern if you have it loaded in PowerPoint).Q: The aspect ratio of vector graphics displays is changed when regenerating after moving a part of the display outside the original bounding box.


A: Yes, there is not much we can do about this. IguanaTex uses the size of the bounding box to determine if the user rescaled the original display. Any change to the structure of the display that modifies the bounding box will result in a change in aspect ratio when regenerating (and the change to the structure will of course be discarded).Q: Some strange things happen to the formatting (color changed, shapes getting filled) when regenerating a vector graphics display.

3a8082e126
Reply all
Reply to author
Forward
0 new messages