Description: The font spacing differs between ODT and DOCX Steps to Reproduce: 1. Open the attached file 2. Save it as DOCX 3. Open the DOCX in LibreOffice 4. Open the ODT 5. Switch back and forward Actual Results: The font spacing is not the same with a DOCX and the ODT file Expected Results: Font spacing should the same Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 5.4.0.0.alpha1+ Build ID: 970b431f1a7b6b96c4c9536657ce4fe9d8f5b585 CPU threads: 4; OS: Windows 6.2; UI render: default; TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-11_23:07:53 Locale: en-US (nl_NL); Calc: single but not in Versie: 4.4.6.3 Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d Locale: nl_NL User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Created attachment 133266 [details] Example file
confirmed with Ubuntu 16.04 / bibisect54. author Miklos Vajna 2017-03-30 07:27:45 (GMT) commit 38b0c24fa5cbb4246e03d77ac022dfdc9fdede03 Related: tdf#105454 DOCX import: fix unwanted enabled-by-default kerning Similar to DOC, DOCX doesn't enable kerning by default. Not a regression, but an uncovered missing feature (so not CCing Miklos). It looks like we aren't exporting kerning for docx (but we do for .doc). [See default paragraph style - Position - Pair kerning].
void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern ) { SAL_INFO("sw.ww8", "TODO DocxAttributeOutput::CharAutoKern()" ); } A small problem arises because Writer's defaultDoc settings have CharAutoKern always enabled. ::OutputDefaultItem thus sets this, and Word then auto-enables kern. However, ::OutputDefaultItem is a new-ish function (Oct 2013 commit 62ceeb1d1a0ff32e1be615f78da796aa13aaa06c), so excluding this from the written default doc properties is probably fine.
Proposed fix at https://gerrit.libreoffice.org/#/c/37574/
Created attachment 133346 [details] KERN_disabled.docx: test file - DocDefault normally does not enable kerning in MSWord. These test files are meant for round-trip testing. Created in MSWord 2013. This first one is the most basic - kerning is only defined in a kern style and directly applied character formatting.
Created attachment 133347 [details] KERN_DocDefault.docx: test file - this one has kern enabled as a DocDefault. The second one enables kerning as a document default, but doesn't touch the Normal/Default property style. (So, default style should match the docDefault.)
Created attachment 133348 [details] KERN_DocDefault_disabledDefStyle.docx: test file - default style explicitly disables kerning. This third test is the strangest. It sets a DocDefault to enable kerning, but explicitly turns it off in the default style.
Created attachment 133349 [details] KERN_enabledDefStyle.docx: test file - default style changed to enable kerning This fourth test is the most normal situation. No DocDefault is defined (kerning is off), but the default style enables kerning.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c7e31f492140a064d9c152583bda3d111c8bee83 tdf#107801 docx export: support w:kern It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Justin L from comment #3) > A small problem arises because Writer's defaultDoc settings have > CharAutoKern always enabled. ::OutputDefaultItem thus sets this, and Word > then auto-enables kern. However, ::OutputDefaultItem is a new-ish function > (Oct 2013 commit 62ceeb1d1a0ff32e1be615f78da796aa13aaa06c), so excluding > this from the written default doc properties is probably fine. This paragraph appears to be completely incorrect. I was unable to reproduce this concern, so it was probably a result of bad development code.